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 -> temp. undo delete in trigger / cascade delete via trigger..

temp. undo delete in trigger / cascade delete via trigger..

From: Jan-Erik Rosinowski <spamfilter_at_rosinowski.de>
Date: 2000/05/26
Message-ID: <393133f5.4942296@News.CIS.DFN.DE>#1/1

hi,

i would like to implement a cascade delete functionality in our database which should be controllable e.g. normally it should be disabled. so a solution ala 'on delete cascade' is not really what we want.

the referential integrity is enforced declaratively via 'references ...'

using the emp/dep-example:

in a before delete row-trigger i cannot delete the depending records with 'delete emp where deptno=:old.deptno' because of ora-4094, collecting the :old.deptnos in a pl/sql table as the update-cascade-package does it, doesn't help either as the delete fails because of the child-records in emp. insert into dep (deptno) values(:old.deptno) of course gives an ora-4091. how can i get out of this circle?

ciao, jan

http://www.rsp.de/

rs&p-Dossier: Software zur Erstellung technischer Dokumentationen

              und Schriftgutes in Verwaltung und Industrie. Received on Fri May 26 2000 - 00:00:00 CDT

Original text of this message

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