Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Database trigger on AFTER UPDATE with Procedure Bldr.

Re: Database trigger on AFTER UPDATE with Procedure Bldr.

From: Dan Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 04 Jan 1999 11:08:17 -0800
Message-ID: <369111A1.828391B4@exesolutions.com>


> > 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?

> 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."

The mutating table error probably has nothing to do with the second table. You can not do what you are attempting to do in a trigger. Instead of using a trigger use a stored procedure. Pass you values to the proc and have the proc query table2 and then insert the appropriate row.

Daniel A. Morgan Received on Mon Jan 04 1999 - 13:08:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US