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
frank.van.bortel@gmail.com - 31 Mar 2006 08:35 GMT
Search for Mutating Table - it's a standard problem, with a standard
solution, and has been presented numerous times
Zaccaria - 31 Mar 2006 08:50 GMT
frank.van.bortel@gmail.com ha scritto:
> Search for Mutating Table - it's a standard problem, with a standard
> solution, and has been presented numerous times
Sorry for my inexperience
Thanks you for help :-)
Matthias Hoys - 31 Mar 2006 10:16 GMT
> I work with Oracle 7.3.4 on Solaris
>
> Zacc
Is that for real ?? 7.3.4 has been desupported for ages now.