help with triggers
From: Laurent <L.Phelep_at_ex.ac.uk>
Date: 1998/03/10
Message-ID: <3505707A.41C6_at_ex.ac.uk>#1/1
9* end;
Date: 1998/03/10
Message-ID: <3505707A.41C6_at_ex.ac.uk>#1/1
Hi,
[Quoted] I have a problem with on triggers:
is it possible to update one row in a trigger if a change of the same was the triggering event??????
here is my trigger and the (useful??) Oracle error messages :
1 create trigger penalty_4
2 after update of Real_Branch_in on contract
3 for each row
4 begin
5 if (:new.real_branch_in<>:old.pred_branch_in) then 6 update contract 7 set total = total +50 ; 8 end if;
9* end;
Trigger created.
SQL> _at_test;
update contract
*
ERROR at line 1:
ORA-04091: table OPS$CS95LP.CONTRACT is mutating, trigger/function may
not see
it
ORA-06512: at "OPS$CS95LP.PENALTY_4", line 3
ORA-04088: error during execution of trigger 'OPS$CS95LP.PENALTY_4'
Thanks for any help ......
-- Laurent PHELEP /\ Third Year Student in Computer Science \/ University of Exeter <> <> Email : L.Phelep_at_ex.ac.uk /\ http://www.dcs.exeter.ac.uk/ug/cs95/lp/ / \ / \ Kenavo / /\/\ \Received on Tue Mar 10 1998 - 00:00:00 CET