Re: Multiple "When" in Trigger
Posted in 1997
Hi.
No, you cannot have multiple "when" in a trigger. Your best bet
would be to create a stored procedure with the "if" clause and then
called this stored procedure inside the trigger.
I had the same problem. Check the manual, it only allows for a
single "when" clause.
Hope that helps.
Sujata
______________________________ Reply Separator _________________________________
Subject: Multiple "When" in Trigger
Author: <joschneidr@aol.com (JoSchneidr)> at internet
Date: 10/16/97 5:25 PM
Hy out there,
my question may sound strange but is there a possibility to have more
then one WHEN-Condition in a trigger ?
I tried out something like this :
create trigger example1insert on tab_1 referencing new as not_old
for each row when (a=1) (execute spl_1());
when (a=2) (execute spl_2());
I tried out multiple version with changing syntax but there is always a syntax
error
after the first "when" condition.
Any help would be appreciated.