Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Problems with Cast/Convert

Author  Topic 

mj
Starting Member

25 Posts

Posted - 2002-07-03 : 13:50:50
I looked at BOL and followed the example, but I am not getting my desired output

Here is my query,
select cast(dealparamount as varchar(15))from deal where borrowerstate = 'il'

Here are the results:

2.646e+007
6.642e+007

What I need is this:

26460000.0
66420000.0


I tried both cast, and convert, they both give me the "e" results, instead of the full number.

I appreciate any help in advance,

Thanks

mj


izaltsman
A custom title

1139 Posts

Posted - 2002-07-03 : 14:05:51
Try something along the lines:

select cast(cast (dealparamount as decimal(18, 1)) as varchar(20))from deal where borrowerstate = 'il'

And in the future try to avoid datatype float wherever possible.


Edited by - izaltsman on 07/03/2002 14:09:06
Go to Top of Page

mj
Starting Member

25 Posts

Posted - 2002-07-03 : 14:09:28
Worked perfectly, thanks

Go to Top of Page
   

- Advertisement -