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

Home -> Community -> Usenet -> c.d.o.server -> Urgent ! Please reply ASAP ref. ORA-04088/ORA-04091

Urgent ! Please reply ASAP ref. ORA-04088/ORA-04091

From: Yogi <yagnesh_shah_at_hotmail.com>
Date: 16 Dec 2002 05:33:39 -0800
Message-ID: <272bd3a7.0212160533.4f05c038@posting.google.com>


Hi,

I have a trigger as below:
CREATE OR REPLACE TRIGGER NewInvoices

	AFTER INSERT ON ARBOR.BILL_INVOICE
	REFERENCING NEW AS newRow
	FOR EACH ROW
	WHEN (newRow.interim_bill_flag = 0)
DECLARE amt NUMBER(18);
	BEGIN 
		SELECT d.amount INTO amt FROM ARBOR.BILL_INVOICE b,
ARBOR.BILL_INVOICE_DETAIL d WHERE
			b.index_bill_ref = d.index_bill_ref AND b.index_bill_ref_resets =
d.index_bill_ref_resets;
		INSERT INTO INVOICES VALUES(:newRow.bill_ref_no,

:newRow.bill_ref_resets, amt, 'INV');
INSERT INTO SENT_INVOICES VALUES(:newRow.bill_ref_no,
:newRow.bill_ref_resets, amt, 'INV');
END NewInvoices;

and I have a script which tries generate an invoice for a particular account no. The details of the script, for some reasons I cannot provide. When I run the script it errors out with this messages:

ORA-04091: table table_name is mutating, trigger/function may not see it

ORA-06512: at "trigger_name", line 3
ORA-04088: error during execution of trigger 'trigger_name'
ORA-06512: at "table_name1", line 47
ORA-06512: at line 1

I would really appreciate if someone would be able to help me out ASAP.
Thanks in advance.

Yogi Received on Mon Dec 16 2002 - 07:33:39 CST

Original text of this message

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