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
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