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: Mark Killick <informbook_at_zetnet.co.uk>
Date: 1997/03/24
Message-ID: <1997032416523676034@zetnet.co.uk>#1/1

In message <332C753C.48D4_at_qrcsun.qrc.org>

        "Lun Wing San (Oracle)" <wslun_at_qrcsun.qrc.org> writes:

> Valentin Maier wrote:
> >
> > 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'

A possible way round the mutating table problem is to create a PL/SQL package that does all the required INSERT/UPDATE/DELETE stuff and call this from your trigger.

Regards,
Mark Killick Received on Mon Mar 24 1997 - 00:00:00 CST

Original text of this message

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