Subject | NUMERIC(18,6) calculation problem |
---|---|
Author | Luis Madaleno |
Post date | 2006-02-23T17:35:54Z |
Hi,
I have this weird calculation problem with NUMERIC(16,6) fields.
----------------------------------------
Unsuccessful execution caused by system error that does not preclude
successful execution of subsequent statements.
Integer overflow. The result of an integer operation caused the most
significant bit of the result to carry.
<<<<<<<<<<<<<<<<<<
This shows up in a trigger with this code:
CREATE TRIGGER OM_BIU1 FOR O_MOVS
ACTIVE BEFORE INSERT OR UPDATE POSITION 1
AS
/* fld1 is NUMERIC(18,6); */
/* fld2 is NUMERIC(18,6); */
/* fld3 is NUMERIC(18,6); */
begin
new.fld3 = new.fld1 * new.fld2;
/* fld2 is always equal to 1 */
end
But this only happens when fld1 is bigger than 9 200 000.
If I enter 9 000 000 in fld1, it works.
Regards,
Luis
I have this weird calculation problem with NUMERIC(16,6) fields.
>>>>>>>>>>>>>>>>>>Error Message:
----------------------------------------
Unsuccessful execution caused by system error that does not preclude
successful execution of subsequent statements.
Integer overflow. The result of an integer operation caused the most
significant bit of the result to carry.
<<<<<<<<<<<<<<<<<<
This shows up in a trigger with this code:
CREATE TRIGGER OM_BIU1 FOR O_MOVS
ACTIVE BEFORE INSERT OR UPDATE POSITION 1
AS
/* fld1 is NUMERIC(18,6); */
/* fld2 is NUMERIC(18,6); */
/* fld3 is NUMERIC(18,6); */
begin
new.fld3 = new.fld1 * new.fld2;
/* fld2 is always equal to 1 */
end
But this only happens when fld1 is bigger than 9 200 000.
If I enter 9 000 000 in fld1, it works.
Regards,
Luis