I've a table that looks like this..
Store # Zip Code Lat # Long #
Using Lat / Long of a location getting the proxmity of each location for example store A1 is 2 miles from the nearest next store and store B2 is 4 miles to the nearest next store.... Thank You again for your assitance
The function GEODIST returns the geodetic distance between two latitude and longitude coordinates. So Doc's code could be modified to use that function and
GEODIST(A.lat, A.long, B.lat,b.long,'M') as Distance.
I have version 9.1 SAS loaded in my desktop when I ran the code it error out " It stated the zipcitydistance function didn't exist. I read on the net that its new for 9.2 if that is the case what can I use to tweak it? I will try the GeoDist... Thank you again for your assitance... What I would like the code to provide in miles is the nearest store... for example store 1 is 3 miles from store 3 and store 2 is 5 miles from store 1 ... Again thanks