Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Urgent ! Please reply ASAP ref. ORA-04088/ORA-04091
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