Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Need help writing a trigger
I have 2 tables involved in a trigger (currently on Interbase). The trigger goes something like this ...
create trigger test
after delete on A
for each row
begin
update B
set status = 'X'
where code = (select code from A tab_a
where tab_a.code = :old.code and tab_a.mydate <= sysdate);
end;
code is the primary key on B, but not on A
Obviously, this trigger causes errors (table mutating). I'm wondering if there is a smart way around this. I cannot re-engineer the tables.
-- kshave_at_minet.gov.mb.caReceived on Tue Mar 04 1997 - 00:00:00 CST
![]() |
![]() |