Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Why don't this trigger work? (Ora 9i)
If I try to compile this trigger with the sql*plus worksheet I get a
message: "Trigger created with compiler error". But if I execute "show
errors" I get the message: "no errors"! Also if I execute "SELECT *
FROM user_errors" I get no error related to my script.
What is wrong with this sql code?
CREATE OR REPLACE TRIGGER "xxx"."ON_UPDATE" AFTER UPDATE of spalte1, spalte2 ON "tabelle" referencing old as old new as new
FOR EACH ROW
when ( new.spalte1 != old.spalte1)
begin
insert into tabelle_his
(his_user, his_action, his_tb, his_id, his_att, his_alt, his_neu,
his_time)
values
(user, 'aendern', 'tabelle', :old.id, 'Attribut', :old.spalte1,
:new.spalte1, sysdate);
END;
when ( new.spalte2!= old.spalte2)
begin
insert into historie
(his_user, his_action, his_tb, his_id, his_att, his_alt, his_neu,
his_time)values
(user, 'aendern', 'tabelle', :old.id, 'Attribut', :old.spalte2,
:new.spalte2, sysdate);
END;
Received on Tue Feb 12 2002 - 08:46:15 CST