Subject TRIGGER: Recording Integer instead of Numeric(4,2)
Author Carol Milius
Hi!

After Update Table1 the Table2 needs some processing.

The trigger below is recording (posting) Integer instead of Numeric(4,2).

Any sugestions?

Carol.

----

CREATE TRIGGER TABLE1_AU0 FOR TABLE1
ACTIVE AFTER UPDATE POSITION 0
AS
declare variable VAR_PESOMEDIO integer;
declare variable VAR_UA numeric(4,2);

begin
if (NEW.UA <> OLD.UA) then
begin
for
select PESOMEDIO, UA
from TABLE2
into :VAR_PESOMEDIO, :VAR_UA
do
update TABLE2
set UA = :VAR_PESOMEDIO / NEW.UA);
end
end