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: Andy Hassall <andy_at_andyh.co.uk>
Date: Tue, 22 Aug 2006 23:59:22 +0100
Message-ID: <bg2ne2docq5b1mrd646ru2e7fiitkf5i7k@4ax.com>


On Tue, 22 Aug 2006 15:35:57 -0700, DA Morgan <damorgan_at_psoug.org> wrote:

>FM wrote:
>>>> Where in the documentation does it say that?
>>
>> It's in the SQL Reference 10g Release 2 (10.2) entry for Create
>> Trigger
>>
>> http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#SQLRF01405
>
>Thank you for the reference. Unless someone can explain to me the
>difference between INSERT and WRITE ... in the context of this doc

 An INSERT is an SQL statement, and not mentioned in the context at all.

 The doc says:

>>You cannot write either the :OLD or the :NEW value.

 A write is an assignment, to the :new or :old variables, which are PL/SQL record types for the row in the table affected.

 A before trigger can modify :new to affect the values actually written to the row (which appears to be what the OP wants to do). An after trigger cannot, it's too late.

>I think the docs are incorrect and have forwarded this thread to
>the person at Oracle that wrote it for comment.

 The docs are fine...

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Tue Aug 22 2006 - 17:59:22 CDT

Original text of this message

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