From: grue@hotmail.com (Grue)
Subject: Re: How to delete from a delete trigger
Date: 1998/02/02
Message-ID: <34d62ad5.22696564@128.158.254.10>#1/1
References: <34D61E8A.1730FAA2@rts.co.il>
X-Complaints-To: abuse@news.msfc.nasa.gov
X-Trace: news.msfc.nasa.gov 886451208 14182 (none) 128.158.97.165
Organization: http://www.msfc.nasa.gov/
Newsgroups: comp.databases.oracle.server



The real problem is probably that you're trying to execute the trigger
for each row.  If possible, remove the "for each row", so that the
trigger will not execute until the statement has finished executing
and the table is in a static state.  This may fix the problem.

Another idea that I've seen posted but have not yet tried is to
exclude the newly deleted record from the delete that you're doing
inside the trigger.  You can do this by adding the following to the
where clause of your delete statement:

     AND table_name.rowid != :old.rowid

Like I said, I'm not sure whether this actually works.

Good luck!


On Mon, 02 Feb 1998 21:29:15 +0200, mordi@rts.co.il wrote:

>I need a trigger that deletes rows from the delete trigger base table,
>whithout getting the ora-4091
>Thanks
>



