Results 1 to 5 of 5

Thread: Trigger Declare

  1. #1
    Join Date
    Dec 2003
    Posts
    10

    Unanswered: Trigger Declare

    I know that some sql procedure statement I can used in trigger, but I got error, when I try this:

    CREATE TRIGGER NEW_TRIG_TEST
    AFTER INSERT ON FH04T18
    FOR EACH ROW MODE DB2SQL
    DECLARE l_proces varchar(50) DEFAULT 'TRIGGER';
    DECLARE l_param varchar(50) DEFAULT 'USE';

    .....


    is it possible to used DECLARE statement in trigger?

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Did you get the message from DB2 ?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2004
    Posts
    30
    You must use declare variables within BEGIN ATOMIC ... END in triggers

  4. #4
    Join Date
    Dec 2003
    Posts
    10

    Other Question

    Thank you for zor help now it is OK.
    I have another problem with DECLARE EXIT HANDLER.
    Is it possible to do this in trigger?

  5. #5
    Join Date
    Jan 2004
    Posts
    30
    I think u cannot use condition handlers within triggers.

Posting Permissions

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