MUTATING PROBLEM !!! IN DATABASE TRIGGER

From: Isaac Chocron <itshak_at_hadassah.org.il>
Date: 1997/11/09
Message-ID: <34657FD6.472C9E0F_at_hadassah.org.il>#1/1


[Quoted] This is a multi-part message in MIME format.
--------------6F6C7A897F0486F7AF1AE39D

Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit

[Quoted] I intented to replace a phisical delete by a logical delete on my table T.
[Quoted] I definided a Before delete trigger that performs:

DECLARE
  NO_DELETE exception;
Begin
  raise NO_DELETE;
EXCEPTION
  when NO_DELETE then
  UPDATE T set HIDDEN_DATE = SYSDATE where rowid = :old.rowid; End;

[Quoted] [Quoted] But I receive an ORA-04091: table T is mutating, trigger/function may not see it.

A possible solution is to batch a database job, but I prefer a local solution to this error.

Do you know another possible solution ?

--------------6F6C7A897F0486F7AF1AE39D

Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Isaac Chocron
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Isaac Chocron
n:              Chocron;Isaac
org:            Hadassah Hospital
adr:            p.o.b    12000;;;Jerusalem;;91120;Israel
email;internet: itshak_at_hadassah.org.il
title:          System Designer
tel;work:       02-6778113

x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------6F6C7A897F0486F7AF1AE39D--
Received on Sun Nov 09 1997 - 00:00:00 CET

Original text of this message