Mutating simply means you're trying to access the
table that you're trigger is currently firing on (in a
row level trigger).

The basic workaround is typically...

before-statement-level
- initialise a PL/SQL table

before-row-level
- store information you need in the PL/SQL table, eg
rowid's of rows being inserted

after-statement-level
- loop thru the PL/SQL table and take any action you
need to do

hth
connor

--- Leslie Lu <[EMAIL PROTECTED]> wrote: > Hi all,
> 
> I got ORA-04091: table mutating problem.  Here is
> the
> case: select from table A and insert them into table
> B.  A trigger is used to check that new DATE must be
> later than every DATE in B.  So I open an cursor,
> loop
> through cursor to compare new DATE value.
> 
> If I tested using hard coded value, the trigger
> works;
> if do a insert ... select, I got ORA-04091.
> 
> I looked through metalink, didn't see anything that
> can help.
> 
> Thank you in advance.
> 
> Leslie
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: Leslie Lu
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX:
> (858) 538-5051
> San Diego, California        -- Public Internet
> access / Mailing Lists
>
--------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from).  You may
> also send the HELP command for other information
> (like subscribing).


=====
Connor McDonald
http://www.oracledba.co.uk (mirrored at 
http://www.oradba.freeserve.co.uk)

"Some days you're the pigeon, some days you're the statue"

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-1?q?Connor=20McDonald?=
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to