Hi all, I am looking to create a function that i can then use on two tables. The first table with UPRN (unique premise ref.), Latitude and Longitude coordinates, geolocation and type. The second table is identical but of a different type.
I am looking to create a function that then lists, for each UPRN in table 1, the nearest UPRN (in order of distance) from table 2. I have looked at using the Geography type but am unsure how to build it into a function that i can then use on table 1. Can anyone please help?