Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Find data within 10m distance of co-ordinates?

Author  Topic 

Maverick_
Posting Yak Master

107 Posts

Posted - 2013-11-22 : 09:50:35
Hi guys,

I am trying to write a piece of SQL which gives me a list of enquiries within 10 metre distance of a enquiry.

The idea is to identify possible duplicates.

Table: enquiry

Primary key: enquiry_number

Co-ordinates data fields: enquiry.enquiry_easting and enquiry.enquiry_northing.

I will need to self-search on the same table to find possible enquiries within 10m distance.

Is there anyone who knows a way to write this type of query and share examples please?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-11-22 : 15:42:07
Could you please post some sample data and an explanation of what the coordinates represent?

For just 10 meter distance, Pythagora's theorem will do just fine and will perform very fast.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page
   

- Advertisement -