RE: Query Analyzer

RE: Query Analyzer

 

  

Thanks, but this only returns 0.00.


-----Original Message-----
From: Santosh Tiwari [mailto:[Email Address Removed] Monday, December 29, 2003 9:33 PM
To: 'Chip Smith'; 'LazyDBA.com Discussion'
Subject: RE: Query Analyzer


this will give you the desired result:

select convert(numeric(20,20), 1/50)

Hope it helps

Santosh Tiwari
Project Manager

-----Original Message-----
From: Chip Smith [mailto:[Email Address Removed] 30 December 2003 02:23
To: LazyDBA.com Discussion
Subject: Query Analyzer


Hi all,
Can anyone suggest a way to retrieve more than two digits to the right of
the decimal point in QA?
Query is fine in OSQL, 0.00 in QA. Any ideas of why and how to get correct
values from the database?
ie;
select cast(1/50 as numeric(20,20))
Results
-----------------------------------------------------
0.00

(1 row(s) affected)
is not what I want.
_____________________________________________________________________
1> select cast(1/50 as numeric(20,20))
2> go

----------------------
.00000000000000000000
(1 row affected)
is what I want.
How can I do this in QA?

Many TIA's

-- chip
MS Sql Server LazyDBA home page