larrydavid
Programmer
Hello,
In the past I've been able to cast exponential notation in SQL Server(2005) with something like this:
SELECT LTRIM(STR(CAST('9.99E15' AS float),100))
Which returns this output:
9990000000000000
But it seems because the values I'm dealing with now have several leading zeros so the conversion always returns 0:
SELECT LTRIM(STR(CAST('2.83E-05' AS float),100))
Output: 0
Could someone please explain what I might be missing for this solution? I guess what I'm asking is how to handle the E-05 notation specifically.
Thanks,
Larry
In the past I've been able to cast exponential notation in SQL Server(2005) with something like this:
SELECT LTRIM(STR(CAST('9.99E15' AS float),100))
Which returns this output:
9990000000000000
But it seems because the values I'm dealing with now have several leading zeros so the conversion always returns 0:
SELECT LTRIM(STR(CAST('2.83E-05' AS float),100))
Output: 0
Could someone please explain what I might be missing for this solution? I guess what I'm asking is how to handle the E-05 notation specifically.
Thanks,
Larry