November 10, 2009 at 2:01 pm
Hi
I am having an int column of length 8..
i have to convert it to Latitude/ longitude value bye using rule-
divide by 10 to the power 6..
but as i do this the scale digits become 000000..
i dont wanna lose them just wana cast the actual value to decimal(8,6)
any help is appreciated
thanks
Thanks [/font]
November 10, 2009 at 2:09 pm
SQL Learner-684602 (11/10/2009)
HiI am having an int column of length 8..
i have to convert it to Latitude/ longitude value bye using rule-
divide by 10 to the power 6..
but as i do this the scale digits become 000000..
i dont wanna lose them just wana cast the actual value to decimal(8,6)
any help is appreciated
thanks
Please show us your code. But before doing that, try this: (YourColumn * 1.0) in place of just YourColumn.
November 10, 2009 at 2:11 pm
i have to cast a column like this
select cast(73982597/1000000 as numeric(8,6))
it gives me 73.000000
but i want result as 73.982597
any help
thanks
Thanks [/font]
November 10, 2009 at 2:21 pm
SQL Learner-684602 (11/10/2009)
i have to cast a column like thisselect cast(73982597/1000000 as numeric(8,6))
it gives me 73.000000
but i want result as 73.982597
any help
thanks
Integer arthimetic. Do this:
select cast(73982597/1000000.0 as numeric(8,6))
November 10, 2009 at 2:39 pm
thnk u thnk thnku:-)
Thanks [/font]
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply