Hi,
My question is can I have multiple WHEN conditions in one trigger? I'm using DB2 for Z/OS v7. I want to take three different actions based on the value that is updated in one column. For example:
IF col1 is updated to "A" then do action1
IF col1 is updated to "I" then do action2
IF col1 is updated to "D" then do action3
It looks like from the syntax diagram for the CREATE TRIGGER statement that the WHEN contition cannot be repeated and I can't seem to get it to work. If this is true then I would have to define 3 separate triggers to accomplish this?
Thanks,
Steve
My question is can I have multiple WHEN conditions in one trigger? I'm using DB2 for Z/OS v7. I want to take three different actions based on the value that is updated in one column. For example:
IF col1 is updated to "A" then do action1
IF col1 is updated to "I" then do action2
IF col1 is updated to "D" then do action3
It looks like from the syntax diagram for the CREATE TRIGGER statement that the WHEN contition cannot be repeated and I can't seem to get it to work. If this is true then I would have to define 3 separate triggers to accomplish this?
Thanks,
Steve