tags:

views:

45

answers:

2

Hi,

I have a float datatype and it gets assigned to 10 decimal points. when i try to convert this datatype to varchar, it retains 5 decimal points and trims the rest of the decimal values.

@final varchar(8000)
select @final=convert(varchar(8000),@final)

it would be really appreciated if you could help me on this!

Thanks

+1  A: 

use sql round method

Salil
+1  A: 

I've solved the problem.

SELECT @final = CONVERT(VARCHAR(80), cast(@lon as decimal(30,15)))

@final string @lon float

jeff