Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Trigger Question
Hi
I'm not e good trigger programmer but
I want to make a trigger that when I update or insert one record in
table, the trigger check the values of a field, and if it is
equal at one prefixed vales, the trigger update another field.
I have TO make this:
create or replace trigger catchupwith
after insert or update on TABLE
for each row
declare
REC_N TABLE%ROWTYPE; begin
SELECT *
INTO REC_N FROM TABLE WHERE ITEM = :NEW.ITEM; IF REC_N.FIELD_A = 'P' THEN UPDATE TABLE SET FIELD_B = '1' WHERE ITEM = REC_N.ITEM ; END IF;
end catchupwith;
unfortunately it not run because the table is open in update "ORA-04091:table string.string is mutating, trigger/function may not see it."
I don't know what I do?
Thanks For Help
I work with Oracle 7.3.4 on Solaris
Zacc Received on Fri Mar 31 2006 - 01:16:16 CST