Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Urgent ! Please reply ASAP ref. ORA-04088/ORA-04091
> 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;
is where your problem is. Try replacing it with
SELECT amount INTO amt
FROM BILL_INVOICE_DETAIL
WHERE index_bill_ref = :newRow.index_bill_ref
AND index_bill_ref_resets = :newRow.index_bill_ref_resets;
and the trigger should work (but not necessarily correctly - I am not sure that detail record is already there when the trigger on master table fires, thus the statement may throw NO_DATA_FOUND.) Besides the fact that you are selecting from the same table the trigger is defined on (which is generally prohibited - that's why you get ORA-4091), your original statement will select more than one row and will fail because single row is expected.
-- Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications. All opinions are mine and do not necessarily go in line with those of my employer.Received on Mon Dec 16 2002 - 08:42:12 CST