If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Problem with triggers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-07, 17:56
gregu gregu is offline
Registered User
 
Join Date: Oct 2007
Posts: 1
Problem with triggers

Hi,
Is possible use NEW, OLD records (in the entirety) within procedure used by trigger (FOR EACH ROW)?
I'm working in Informix 9.4.
thx.
Reply With Quote
  #2 (permalink)  
Old 10-29-07, 09:04
rbshevlin rbshevlin is offline
Registered User
 
Join Date: Oct 2007
Posts: 5
Yes, you can use old and new in a trigger, and triggers can be setup to be assoc. with just one column or the whole table. Below is an example of a trigger that is setup for one column:

CREATE TRIGGER "informix".rss_onld_enc_upd_trig
UPDATE OF encrypt_card_num
ON "informix".rss_onld_encryp REFERENCING OLD AS O NEW AS N
FOR EACH ROW
(
execute procedure "informix".wegcardlog('rss_onld_encryp', 'update',
(o.proc_dte || o.proc_seq ) ,n.card_acct_num ,o.encrypt_card_num
,n.encrypt_card_num ));

This is an example of an update trigger, where the trigger is referencing the "old" and the "new" data.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On