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: Help with Triggers

Re: Help with Triggers

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 22 Aug 2006 15:32:19 -0700
Message-ID: <1156285937.345232@bubbleator.drizzle.com>


Serge Rielau wrote:

> DA Morgan wrote:

>> FM wrote:
>>
>>> Also, the 10gR2 documentation indicates that :
>>>
>>> Restrictions on AFTER Triggers AFTER triggers are subject to the
>>> following restrictions:
>>> You cannot write either the :OLD or the :NEW value.
>>>
>>> So you should change the trigger to a BEFORE trigger.
>>>
>>> FM
>>
>> Where in the documentation does it say that?
>>
> <snip>

>> 10 INSERT INTO audit_log
>> 11 (o_fname, o_lname, n_fname, n_lname, chng_by, chng_when)
>> 12 VALUES
>> 13 (:OLD.fname, :OLD.lname, :NEW.fname, :NEW.lname, USER, SYSDATE);
>> 14 END referencing_clause;
>> 15 /
> <snap>

>> Because it is not correct. Nor do I think it was correct in 8i or 9i and
>> possibly long before that.

> READ <> WRITE

The original post says:
You cannot write either the :OLD or the :NEW value.

I posted:
INSERT INTO audit_log
11 (o_fname, o_lname, n_fname, n_lname, chng_by, chng_when) 12 VALUES
13 (:OLD.fname, :OLD.lname, :NEW.fname, :NEW.lname, USER, SYSDATE);

You responded with:
READ <> WRITE

Where in my INSERT STATEMENT do you see a READ?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Aug 22 2006 - 17:32:19 CDT

Original text of this message

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