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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL: Mutating Table

Re: PL/SQL: Mutating Table

From: David Jones <david_j.jones_at_virgin.net>
Date: 1997/03/13
Message-ID: <01bc2fe9$e66fbfe0$LocalHost@daves.virgin.net>#1/1

Valentin Maier <maier_at_mailman.epnet.com> wrote in article <3326CBC5.1172_at_mailman.epnet.com>...
> Environment: Oracle 7.3, running on an NT box.
>
> I have an update trigger that is very simple:
>
> CREATE OR REPLACE TRIGGER article_FNAME
> AFTER UPDATE OF FNAME ON mfs.article FOR EACH ROW
> BEGIN
> IF (:old.FNAME IS NOT NULL) THEN
> INSERT INTO mfs.arttrans

 (AN,DTUPDATE,OPERINIT,UPDATETYPE,UPDATEPROCESS)
> VALUES (:old.AN,SYSDATE,:old.PRINIT,'C','A') ;
> END IF ;
> END ;
>
> When I try to update article.FNAME field, I get the error message:
>
> ERROR at line 1:
> ORA-04091: table MFS.ARTICLE is mutating, trigger/function may not see it
> ORA-06512: at "MFS.ARTICLE_FNAME", line 4
> ORA-04088: error during execution of trigger 'MFS.ARTICLE_FNAME'
>
> Any idea why this happens?
>
>
> TIA,
>
> Valentin.
>

I got this problem on a denormalised database with constraints.

i.e. I tried to update a total column in a master table by summing records in a detail table each time they were updated. The detail table had a foreign key constraint to the masters primary.

Dave. Received on Thu Mar 13 1997 - 00:00:00 CST

Original text of this message

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