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.
| Author |
Topic |
|
sureshms
Starting Member
1 Post |
Posted - 2011-12-02 : 04:35:31
|
| SQL Server 2000I have a table Person, Lat, Lon, DateAndTimeGiven a period how can i find i find total dist travelled by a person |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-12-02 : 04:56:50
|
| Take consequtive date and time entries - calculate the distance between the locations (Pythagorus' theorum) then sum the results.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-02 : 05:39:28
|
quote: Originally posted by sureshms SQL Server 2000I have a table Person, Lat, Lon, DateAndTimeGiven a period how can i find i find total dist travelled by a person
what are datatypes of Lat and Lon?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2011-12-02 : 10:08:36
|
| You can use this function to calculate the distance between two pairs of latitude and longitude.Great Circle Distance Function - Haversine Formulahttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81360However, that will calculate the direct distance between the points, not how far they had to drive, fly, walk, etc.CODO ERGO SUM |
 |
|
|
|
|
|