Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Trying to round result of a computation to 2 digits of precision - forum topic by tbenard

$
0
0

Hi,  I read through the forum on such topics as CAST and ROUND, but somehow I am not having any luck.  I have this expression in my select:
Select cast (PROJ_INV_CS as float) / case
when GRS_POS_FCST_CS > 0 then cast(GRS_POS_FCST_CS as float)
else .0000000001 end
as WOS
This works great and is very accurate, however I want to round the result to 2 digits of precision.  When I try to cast the expression, I get numeric overflow.  when I try to round, I get numbers with the same degree of precision, they just differ in the digits after the number of digits I am rounding to.  Thanks in advance...

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>