| Re: Has anyone worked on location based shipment search? Assuming you have the long/lats for all your locations in OTM, and you don't mind if the 50 mi is a crow flight distance, then you can take the mathematical route using the Spherical Law of Cosines: d = acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat2).cos(l ong2−long1)).R.
It may be difficult though to convert this formula to sql within the 801 characters limit OTM allows for Saved Queries, but it's worth a try. |