Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Caclulate Distance Expand / Collapse
Author
Message
Posted Friday, July 22, 2011 6:51 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 24, 2014 1:51 PM
Points: 25, Visits: 151
Hi,

how to calculate distance (in meters/KMs) between 2 lat/long as Cartesian product in 2 tables


Thanks
Grace
Post #1147003
Posted Saturday, July 23, 2011 3:22 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 11:33 PM
Points: 7,042, Visits: 12,970
This link should help you to get started.



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1147043
Posted Saturday, July 23, 2011 1:06 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:06 PM
Points: 36,786, Visits: 31,243
gracebite (7/22/2011)
Hi,

how to calculate distance (in meters/KMs) between 2 lat/long as Cartesian product in 2 tables


Thanks
Grace


Actually, if you Google'd/Yahoo'd what I've highlighted in your original question above, you'd have gotten all the information you need without having pri knowledge that these are affectionately referred to as "Great Circle Calculations". Give it a try.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1147111
Posted Saturday, July 23, 2011 11:46 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 9:00 PM
Points: 3,122, Visits: 11,409

Great Circle Distance Function - Haversine Formula
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81360




Post #1147175
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse