I'm trying to populate a Flexgrid using an SQL query that involves values external to the database being queried.
The database contains latitudes and longitudes of points of interest on Earth.
Point A, -43.5644,-79.5432
Point B, -89.5433, 76.3343
Point C, 54.6433 , 65.4432
What I want to do is enter a latitude and longitude of a central location (ie. my car), calculate the distance from that location to each of the points of interest located in the database and populate the Flex Grid with only those points that are located within a certain distance from that central location.
I would have no problems doing this if the central location was fixed, but dynamic central location makes it a little tricky.
Can this be done using an SQL query do do I have to try other magic to make this work?
Thanks for any help!