I have a table with several records, each of which contains a field called "coords". This field has been updated with a geographical point.
UPDATE testing SET [coords] = geography::Point(52.029736, -113.973541, 4326)
WHERE id=2"
What do I need to do ... when the user is logged in, they have a record belonging to them, because in this example their record identifier # 1 is indicated. They need to visit a page that shows all the other records, the โcoordinatesโ fields at a certain distance.
This is the best I have come up with;
Fourth, I can find a beginning coordinated with this statement;
SELECT coords FROM testing WHERE id=1
This gives me the original coordinate as coords.Lat and coords.Long
Then I would like to find them nearby, so I have this:
SELECT * FROM testing WHERE coords.STDistance() <=(20 * 1609.344)
, , .
, - coords.Lat/coords.Long STDistance? , , .
FYI, SQL-, "", select * from table where record = 1 .