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

Home -> Community -> Usenet -> c.d.o.tools -> Calling a proc in a trigger

Calling a proc in a trigger

From: Matthieu DEGLIN <mdeglin_at_partner.auchan.com>
Date: Mon, 9 Jul 2001 10:42:28 +0200
Message-ID: <9ibqf8$j6e$1@reader1.imaginet.fr>

Hi,

I'm working on a table TABLE_TOP that has 2 columns: TOP, CODE. I've defined a trigger on it as followed:

TRIGGER TRG_TOP
AFTER UPDATE OF TOP ON TABLE_TOP
FOR EACH ROW
BEGIN
  PROC_TOP(:NEW.CODE);
END; The procedure that is called in the trigger need to access to the table TABLE_TOP: PROCEDURE proc_top(p_code in char) is
...

select count(*)
 into nb
 from TABLE_TOP
 where TOP = 'O'
 and CODE= p_code;
...

END; BUT... The following error has occurred:
ORA-04091: table TABLE_TOP is mutating, trigger/function may not see it

How can I solve that error ?
Is it impossible to access to a table in a trigger on that same table ?

Thanks for help. Received on Mon Jul 09 2001 - 03:42:28 CDT

Original text of this message

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