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
 General SQL Server Forums
 New to SQL Server Programming
 E-2, E-3 problem

Author  Topic 

Zavo
Starting Member

2 Posts

Posted - 2007-11-19 : 17:42:09
Hello everybody,

I am quite new in SQL Server and have following problem:

When I read ma data:

select ident,art,price,fieldsf,fieldsh from Zakanora.dbo.MS

I get following data:

007902 09 9.600765365732E-2 0790201 0000000
057152 09 14 5.1100 5715201 0000000
057147 2701 18.28007676744E-3 5714701 0000000
and so on....51372 x times....

Now I would like my sql to show numbers like 0.09600765365732 instead of showing E-2 or E-3 at the end. Also I need only 4 digit numbers.

Can anyone help me?
Thanks in advance.

anonymous1
Posting Yak Master

185 Posts

Posted - 2007-11-19 : 17:45:08
try looking in books online at the convert statement. depending on the value range, here is one possible answer...
select ident,art,CONVERT(money, price) as money_price,fieldsf,fieldsh from Zakanora.dbo.MS
Go to Top of Page

Zavo
Starting Member

2 Posts

Posted - 2007-11-19 : 18:16:11
quote:
Originally posted by anonymous1

try looking in books online at the convert statement. depending on the value range, here is one possible answer...
select ident,art,CONVERT(money, price) as money_price,fieldsf,fieldsh from Zakanora.dbo.MS




You are a genius, thanks...
Go to Top of Page
   

- Advertisement -