January 29, 2011 at 2:39 am
I want to add zeroes for all the gps coordinates i have which end with a single number after the decimal point for ex: i have N 24 34.124,E 46 38 25.3 i want N 24 34.124,E 46 38 25.300.
Can anyone help me plaese...........
Its urgent????
January 31, 2011 at 6:00 am
That's a formatting issue, not a data storage issue. You should deal with that on the client side, not in your database.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 31, 2011 at 6:04 am
store the latitude and longitude in decimal form only.
it's trivial to convert the decimal to the long syntax, but very difficult to do it back from text to decimal...lots of parsing is required.
for example, Decimal Degrees = Degrees + minutes/60 + seconds/3600
so (24 34.124,46 38 25.3) should be stored as (24.56873333333333,46.64036111111111); then you can display it any way you want, but it's much eisier to calculate when you need something withing 10 miles/kilometers of a point or not.
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply