Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2009
    Posts
    3

    Unanswered: DB2 trigger question

    Can I use multiple BEGIN ATOMIC/END statements in a single trigger? e.g.
    BEGIN ATOMIC
    statement1;
    END
    BEGIN ATOMIC
    statement2;
    END

    The reason I am asking is I have two different actions that need to take place from the trigger and I want them to be independent of each other e.g. if first one fails then the second one should execute. And if yes, then does the Syntax look ok?
    Any help on this would be greatly appreciated.

    Thank you.
    Last edited by ssamant01; 01-07-09 at 11:19.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    The way I read the SQL syntax diagrams, No.

    Andy

  3. #3
    Join Date
    Jan 2009
    Posts
    3
    Is there any way to do what I am trying to accomplish? I have one INSERT statement in the trigger that writes to a table. I need to modify the trigger to add another insert statement that would write to a different table. I want those two actions independent of each other i.e. even if the first one fails the second one should still execute.

    Thanks.

  4. #4
    Join Date
    Jan 2009
    Posts
    3
    Is there any way to do what I am trying to accomplish? I have one INSERT statement in the trigger that writes to a table. I need to modify the trigger to add another insert statement that would write to a different table. I want those two actions independent of each other i.e. even if the first one fails the second one should still execute.

    Thanks.

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Starting with v9, you can call a stored procedure from a trigger.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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