Re: 'insert or update trigger' to update the same table
Date: Mon, 27 Aug 2001 22:16:31 GMT
Message-ID: <20010827.22163118_at_mis.configured.host>
already being processed in the trigger)
If you really want to update other records (than the actual one being
processed) in a trigger then you must use a whole diferent approach.
>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<
> Hi!
> Maybe it's just a simple problem for some of you, but I really
> desparate to find the solution.
> This is my trigger
> CREATE OR REPLACE TRIGGER OBJ
> BEFORE INSERT OR UPDATE ON OBJ
> FOR EACH ROW
> BEGIN
> update OBJ
> set OBJ.DESCR=to char(sysdate)
> where status=true and serial=:new.serial
> END;
> I get an error that the table is mutating.
> I know the reason of this error, but I can't find any other solution.
> I think I have to use row level trigger since I have to know the
> serial from the row which is updated or inserted.
> I've tried to create a view and then an INSTEAD OF TRIGGER, but I
> always get an error which said that my trigger is invalid (I use TOAD
> Thank you in advance!!
> sien
Received on Tue Aug 28 2001 - 00:16:31 CEST