Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Posts Tagged ‘float to string

float to string sql cast or convert

leave a comment »

If you directly use convert it gives you solution in terms of +e. But if we convert it to bigint first then it provide the correct conversion to string.

CONVERT(nvarchar,  CAST(floattoconvert as bigint))

You can use str function but you need to be careful as it appends 0 or space while converting the same. So it would be bit tricky to use str function.


Written by Manish

August 10, 2010 at 7:29 pm