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: how to determine Delete-state in a trigger "BEFORE DELETE OR UPDATE"

Re: how to determine Delete-state in a trigger "BEFORE DELETE OR UPDATE"

From: Alan <alan_at_erols.com>
Date: Tue, 21 Sep 2004 10:11:51 -0400
Message-ID: <2rar59F178gieU1@uni-berlin.de>

"Dietmar Brueckmann" <Dietmar.Brueckmann_at_lycos.de> wrote in message news:2raq1nF17a15oU1_at_uni-berlin.de...
> Hi,
>
> I've written 2 trigger "BEFORE DELETE" and "BEFORE UPDATE" to save the old
> record in an other table.
> I want to combine them in one, because they are very similiar.
> But there are little differences. The insert statement sets a value
> WHAT_DONE to "D" in the DELETE-Trigger and to "U" for the UPDATE-Trigger.
> I would like to have an IF-statement like this
>
> IF trigger_operation = tropDelete THEN
> ....
> END IF;
>
> Is there any solution?
>
> Thanks and best regards
> Dietmar
>
>

BEGIN
IF INSERTING THEN
your code
ELSEIF UPDATING THEN
your other code
END IF; HTH Received on Tue Sep 21 2004 - 09:11:51 CDT

Original text of this message

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