Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Avoding Mutation of Table trigger
Hi Nabba
One question : Is TAB2 empty and TAB1.AMT values are null or 0 before the creation of the trigger ?
Kamel Benlatreche
-----Message d'origine-----
De : njneog_at_oil.asm.nic.in [mailto:njneog_at_oil.asm.nic.in]
Envoyé : mardi 20 août 2002 08:28
À : Multiple recipients of list ORACLE-L
Objet : Avoding Mutation of Table trigger
Hi,
This problem/solution may be posted earlier, but would like to hear a solution from you.
I have two table say TAB1 and TAB2. TAB2 is a detail of TAB1 table.
Now I would like to write a trigger in TAB2 for INSERT and UPDATE operation which will update the AMT coloum of TAB1. The value to be updated is sum of AMT coloumn of TAB2 for the PK_KEY value.
i.e. select sum(amt) into tot from TAB2 where PK_KEY= :NEW.PK_KEY;
Since TAB2 is currently being modified it can not be read.
so, how to solve it ?
TIA Regards.
Naba
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: N J Neog
INET: njneog_at_oil.asm.nic.in
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: ListGuru_at_fatcity.com (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).
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: ListGuru_at_fatcity.com (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). Received on Tue Aug 20 2002 - 08:38:23 CDT