Archives of the TeradataForum
Message Posted: Wed, 22 Nov 2006 @ 20:55:05 GMT
I am having a following problem.
After performing calculations like
(abs( (0.464)* (coalesce(T1.Policy_Age_s,0))/(SUM1+3.0731) ) ) as Reason_Cd1 ,(abs( (0.235)* (coalesce(T1.Avg_Prop_Dmg_Covg_Prem_s,0))/(SUM1+3.0731)) ) as Reason_Cd2
the results are being inserted into a table. Both Reason_Cd1 and reason_Cd2 are declared as DECIMAL(18,15) in that table.
T1.Policy_Age_s, T1.Avg_Prop_Dmg_Covg_Prem_s and SUM1 are declared as DECIMAL(18,10). What is happening is that Reason_Cd2 is being rounded to a closest integer which is 0 in that case. Apparently the real result is exceeding precision of DECIMAL(18,15). Can anybody advise me how to avoid this problem ?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|