Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

case expression truncates decimal

Status
Not open for further replies.

stkarma

Technical User
Oct 3, 2001
31
0
0
US
I am creating an sql view in Progress using Progress'SQL explorer tool for Progress v9.1e02.
The case expression automatically rounds the decimal value to the next whole number. How can I get the decimal value?
Here is the view code:

select reverseflag, orderno, parentorder, labortime,
case when reverseflag is null then cast(0.0000 as decimal(10,4))
when "reverseflag"=-1 then cast(labortime*-1 as decimal(10,4))
when "reverseflag"=0 then cast(labortime as decimal(10,4))
else 0.0000 end
from v_sbs_laborlog2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top