Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Database trigger on AFTER UPDATE with Procedure Bldr.
In article <01be31a7$8c9dbdc0$LocalHost_at_viao1.camk.com>,
"Andy Hardy" <aph_at_ahardy.demon.co.uk> wrote:
> The mutating table message shows that you are trying to query a table value
> which is/may be currently being modified, in this case the :old value. It
> *may* work if you referred to the :new value - I forget the exact
> conditions for mutation and I'm almost surprised that you are getting a
> mutation problem... unless entry_id is being updated?
>
> As far as I can see, your code should look something like:
>
> BEGIN
> SELECT descrip2
> INTO :new.descrip1
> FROM table2
> WHERE (table2.entry_id = :new.entry_id)
> ;
> END;
>
>
I tried that code, and regardless of whether I use "new" or "old", it returns
the error message "Cannot change trigger NEW values in AFTER row triggers."
Thanks.
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Dec 28 1998 - 10:28:44 CST