Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Why don't this trigger work? (Ora 9i)

Why don't this trigger work? (Ora 9i)

From: odette <odette.h_at_gmx.de>
Date: 12 Feb 2002 06:46:15 -0800
Message-ID: <66e0618e.0202120646.64546bd0@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US