Re: Work Around for Mutating Trigger Error
Date: 2 Aug 2001 22:52:53 -0700
Message-ID: <7256fcf8.0108022152.799fe01a_at_posting.google.com>
gregstarnes_at_hotmail.com (greg) wrote in message news:<c61056f4.0107171349.2ddf66fa_at_posting.google.com>...
Why do you have to do it in triggers? Do it the old fashioned way.
You know, the way you'd have done it if there were no triggers.
delete from table_a;
> Here's What Im trying to accomplish:
>
> CREATE TRIGGER
> AFTER DELETE ON table_A
> FOR EACH ROW
>
> BEGIN
> SELECT FROM table_A
> ...
> IF SQL%ROWCOUNT = 0
> THEN ...
> ELSE DELETE FROM table_B
> END IF;
> END;
>
> The concept here being that if I delete a row from table_a, I need to
> look at the rest of table_a table for additional requirements. If
> those requirements are met, I need to delete from another table.
> I understand that this is not possible: reading from a table through a
> trigger that has the table locked for the delete. Anyone know any
> easy workarounds. There is a LOT of Reporting code around this table,
> and I would hate to have to have the reporting team rewrite all their
> code so that I can change their table.
>
> Thanks in advance!
> Greg
delete from table_b where ...;
I hope this doesn't come across as being snotty. I'm pretty tired right now, so the dry humor flows unabated.
Will. Received on Fri Aug 03 2001 - 07:52:53 CEST