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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Avoiding recursive triggering

Re: Avoiding recursive triggering

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Wed, 8 Dec 1999 12:43:01 +0100
Message-ID: <82lg31$10ut0$1@oceanite.cybercable.fr>


You can use something like:
create ...

   change_date date;
begin

   SELECT ROUND(SYSDATE) into change_date FROM DUAL;    :new.date_changed := change_date;
end;

--
Have a nice day
Michel

Morten Primdahl <morten_at_caput.com> a écrit dans le message : 384E3438.77870FF1_at_caput.com...
>
> Howdy.
>
> Is there a way I can avoid recursive triggering?
>
> CREATE OR REPLACE TRIGGER upd_trg_table
> AFTER UPDATE ON table
> FOR EACH ROW
> BEGIN
> UPDATE table SET date_changed = (SELECT ROUND(SYSDATE) FROM DUAL)
> WHERE id = :old.id;
> END;
>
> I haven't tested the above trigger, but it looks
> recursive to me. Is there some standard way to avoid
> a such recursion?
>
> Thanks,
>
> Morten
>
> --
> Morten Primdahl Caput ApS Tel +45 33 12 24 42
> morten_at_caput.com Nygade 6 Fax +45 33 91 24 42
> http://www.caput.com DK-1164 Kbh K
Received on Wed Dec 08 1999 - 05:43:01 CST

Original text of this message

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