Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> trigger with ora-04091
hello all,
I created a trigger on a coloum ( resultaat ) of a table ( z_wedstrijden ) after update for each row. in this trigger I called a procedure that make update in another table(z_spelers). but when i update table(z_wedsrtrijden) i get the error : ora-04091z_wedstrijden is mutating table......
i tried instead of row trigger a statement trigger with same trigger
code but then the trigger not fired when i updated table
(z_wedstrijden). so does you know what is the cause of that ? and how
can i resolve it ? i appreciate your help.
Greetings,
Below is the definition of my trigger and the procedure that i call in
that trigger.
--- trigger----------
CREATE OR REPLACE TRIGGER SYSTEM.UITVOER_TOTO
AFTER UPDATE
OF RESULTAAT
ON SYSTEM.Z_WEDSTRIJDEN
REFERENCING NEW AS NEW OLD AS OLD
DECLARE
Cursor c_wedstrijden is select id from z_wedstrijden;
r_wedstrijden c_wedstrijden%rowtype;
BEGIN
For r_wedstrijden in c_wedstrijden
Loop
p_bereken_totaal_scores(r_wedstrijden.id);
end loop;
END ;
---------procedure----------------
r_voospelling c_voorspelling%rowtype; v_resultaat z_wedstrijden.RESULTAAT%type;begin
end if;
end loop;
end p_bereken_totaal_scores;
Received on Tue Dec 21 2004 - 09:36:59 CST