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: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 23 Sep 2004 09:12:20 GMT
Message-ID: <slrncl54rf.3b0.rene.nyffenegger@zhnt60m34.netarchitects.com>


In article <2raq1nF17a15oU1_at_uni-berlin.de>, Dietmar Brueckmann wrote:
> 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

Dietmar

Oracle has a workspace manager that allows you to go back in time on your tables. If you use it, you don't have to write triggers, Oracle takes care of saving 'old' records away.

I have put a little example for the workspace manager on my website: http://www.adp-gmbh.ch/ora/workspace_manager/example_1.html

hth
Rene

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch/
Received on Thu Sep 23 2004 - 04:12:20 CDT

Original text of this message

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