Reputation: 777
While converting float value to varchar its giving me exponential value. For eg -
if '313185515' is float value then its varchar
value I am getting is **3.13186e+008**
I don't want exponential value.
Upvotes: 0
Views: 1957
Reputation: 777
We can do this way too -
CONVERT(VARCHAR(50),Cast (ColumnName as Decimal(18,0)))
Upvotes: 0
Reputation: 62831
Look at using STR
:
SELECT LTRIM(STR(313185515, 10))
Or if you want decimals:
SELECT LTRIM(STR(313185515, 10, 2))
http://sqlfiddle.com/#!3/d41d8/8588
Good luck.
Upvotes: 2