Exponential to Decimal conversion

Posted by Murugavelmsc under Sql Server on 12/16/2014 | Points: 10 | Views : 415 | Status : [Member] | Replies : 1
Hi Experts,

I need to convert exponential to decimal form.


Also i know the number length exceeds 38.

How can i achieve the below scenario?

SELECT cast(cast(5.14644689102499E+40 AS float) as numeric(19,4))

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/



Responses

Posted by: Bandi on: 12/16/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down

select Cast ( Cast (columnname as float(20)) as decimal(25,20))  columnname  from table
WHERE CHARINDEX('E',columnname) <> 0 AND ISNUMERIC(columnname)=1


http://sreenivasareddythotli.blogspot.in/2012/01/how-to-get-exponential-values-as.html
http://www.experts-exchange.com/Database/MS-SQL-Server/Q_23566592.html

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response