Pranay Deep
Pranay Deep

Reputation: 1401

Query to convert exponential number to float in SQL Server

I am using

SELECT CAST('5E-05' AS float) 

result = 0.00005

and it is not working. Help.

https://www.google.co.in/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=5E-05+to+decimal

Upvotes: 1

Views: 10783

Answers (1)

KumarHarsh
KumarHarsh

Reputation: 5094

Provide correct output for this so that we test and throw few more sample data.

Try this,

SELECT CONVERT(decimal(18,8), CAST('5E-05' AS FLOAT))

Upvotes: 4

Related Questions