Hi,
This is the pseudo-SQL query that I'd like to acheive :
Select A.ID, B.ID, Distance (A.Lat, A.Long, B.Lat, B.Long, "m")
From MyTable As A, MyTable as B
Where A.ID > B.ID
And A.Lat is not Null
And B.Lat is not Null
And Distance (A.Lat, A.Long, B.Lat, B.Long, "m") < 500
I looked in the MapInfo SQL, and there is indeed a Distance function.
But it doesn't allow me to join a table with itself.
And to answer your question, if A, B and C are on a straight line, each one separated by 300m, I'd like to have the results :
A, B, 300
B, C, 300
------------------------------
JJ CASALONGA
Knowledge Community Shared Account
------------------------------
Original Message:
Sent: 07-22-2022 10:19
From: Uffe Kousgaard
Subject: Query to find records that are closed from each other
Assume your points are on a line, 300 meters apart. Still using a threshold of 500 meters.
Now A and B are within distance and so are B and C. But A and C are not (dist=600 meters).
Which result do you expect?
------------------------------
Uffe Kousgaard
ROUTEWARE
Roskilde
------------------------------