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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Postcodes 4m table within given postcode & radius

Author  Topic 

sree1509
Starting Member

1 Post

Posted - 2014-05-23 : 02:35:53
I have table with latitude,longitude and postcodes. I want select the records which are near by given postcode and radius in miles. e.g user will give inputs postcode = 'NW44JL' and radius = 1 mile. I need to get all the records from the table with in 1 mile radius of postcode 'NW44JL'. Can anyone help me to get this. Thanks.

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2014-05-23 : 13:29:13
Here are a couple of links:
http://stackoverflow.com/questions/3983325/calculate-distance-between-zip-codes-and-users
http://blogs.lessthandot.com/index.php/datamgmt/datadesign/sql-server-zipcode-latitude-longitude-pr/

If those don't work try:
http://bit.ly/TCAVg6
Go to Top of Page
   

- Advertisement -