Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Posts
    1

    Unanswered: 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.

  2. #2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •