Geolocation Queries based on where you live

  • I need some help with setting up Geolocation Queries.

    If i have a Users Table with addresses, postcodes, etc.... and on the front of my website i want to search a list of locations within say 5kms of my Postcode how would i set up my SQL tables and data to achieve this in Query?

    Is there perhaps something more complex based on longitude/lattitude i would need to set up or perhaps some simple way of deciding how close a particular location is?

  • Have a look at the Geography data type and all the associated spatial functions

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply