Re: tell updated fields from within a trigger - how ?

From: Rod Corderey <Lane_Associates_at_compuserve.com>
Date: Sun, 24 May 1998 09:49:07 +0100
Message-ID: <3567DF03.7FC51CF0_at_compuserve.com>


Hi,

my earlier post may have been off track, I presumed that you were talking about a Forms pre-update trigger, but from the later post by tnasset you might , of course, be refering to a before-update database trigger.

If you are talking about a database trigger then the situation changes completely. Although you could use the 'if updating ('column_name') syntax you would have to hard code all existing column names for the appropriate table into the trigger as although you could retrieve the current possible column names via a cursor the resulting comparison would not be able to be dynamic. [ you could do a dynamic comparison with decode, dual and DMS_SQL I suppose yuk ]. Also you would still have the :new=:old syndrome.

I think the only robust route is at the point where the update is performed, either forms or some other method, signalling to wherever the resulting information is needed.

regards

Rod Corderey
Lane Associates
Lane_Associates_at_Compuserve.com
http://www.Lane-Associates.com

dov_shnaider_at_my-dejanews.com wrote:
>
> Hi,
> Is there a way to tell what fields an update statement is trying to update
> from within a pre-update trigger ?
>
> e.g.
> the user issues : update table set field1=vl1 field2=val2 field3=val3
> when val1,val2,val2 may or may not be identical to the current values in the
> table row.
>
> can the pre-update trigger identify the particular field names:
> field1,field2,field3 (even when the new and old values are identical) ?
>
> Thanks
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
Received on Sun May 24 1998 - 10:49:07 CEST

Original text of this message