I'm trying to update a table value that is initially set to 0, I'm working with DB2. However, when I go to execute my SQL I get the following error:
DSNT408I SQLCODE = -406, ERROR: A CALCULATED OR DERIVED NUMERIC VALUE IS NOT
WITHIN THE RANGE OF ITS OBJECT COLUMN
DSNT418I SQLSTATE = 22003 SQLSTATE RETURN CODE
I understand what the error means, but I do not understand why I am getting it. Here is my SQL:
UPDATE INTTABLE
SET PAYMENT = DECIMAL((MONTHIRATE*OMA)/(1-POWER(1+MONTHIRATE,-420)),8,2);
Where PAYMENT is defined as DECIMAL(8,2)
Could someone please explain to me why the above UPDATE statement will not work?