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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Mutating table error

RE: Mutating table error

From: Thapliyal, Deepak <DThapliyal_at_ea.com>
Date: Thu, 12 Oct 2000 12:02:46 -0700
Message-Id: <10647.119099@fatcity.com>


hi Helmut,

remove the "for each row" clause .. so that u have a st. level trigger instead of row level .. note that there is no mutation in statement level triggers .. also check if this meets ur business req and is reallt what u want your trigger functionality to achieve.

hth
deepAk

-----Original Message-----

From: Helmut Daiminger [mailto:hdaiminger_at_vivonet.com] Sent: Thursday, October 12, 2000 11:55 AM To: Oracle List (Telelist); Oracle DBA List (Lazy DBA) Subject: Mutating table error

Hi!

I got a problem with mutating tables here.

I am updating a row in a table (table_name). There is an after update trigger associated with that table. Within that trigger I try to READ the same table and I get a mutating table error.

CREATE OR REPLACE TRIGGER TBTABS_TRIGGER_UPD_AFTER AFTER UPDATE ON table_name
REFERENCING OLD AS OLD NEW AS NEW
FOR EACH ROW
declare AA Integer;
BEGIN
    AA:=40;
    select count(*) into AA from table_name;     update WHLineType set Amount=AA;
end;

Any idea what I could do to avoid the mutating table error?

Thanks,
Helmut



Think you know someone who can answer the above question? Forward it to them!
to unsubscribe, send a blank email to oracledba-unsubscribe_at_LAZYDBA.com to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com Received on Thu Oct 12 2000 - 14:02:46 CDT

Original text of this message

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