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 -> Re: Urgent ! Please reply ASAP ref. ORA-04088/ORA-04091

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

From: Harald.Mitterhofer <Harald.Mitterhofer_at_tecco.at>
Date: Mon, 16 Dec 2002 18:55:30 +0100
Message-ID: <3DFE1392.1080409@tecco.at>


Yogi wrote:
> 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

the solution to your problem is described at http://osi.oracle.com/~tkyte/Mutate/index.html /mitt Received on Mon Dec 16 2002 - 11:55:30 CST

Original text of this message

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