Dear All,
I have made this trigger
create trigger test
on mixanaki
after update
as
if update (flag1)
update mixanaki set flag2=flag1
where mixanaki.[id]=(select [id] from inserted)
My Problem Are the following:
1. If i try to update more than one rows on table mixanaki the trigger doesn't work With Error Message:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
2. Is it possible if the flag1 doesn't change value on update the trigger don't be enabled.
I mean if the flag1 has value=1 and then i run a command: update mixanaki set flag1=1 where id=.... in this case i don't want to be enabled the triger
Thanks a Lot and best Regards
I have made this trigger
create trigger test
on mixanaki
after update
as
if update (flag1)
update mixanaki set flag2=flag1
where mixanaki.[id]=(select [id] from inserted)
My Problem Are the following:
1. If i try to update more than one rows on table mixanaki the trigger doesn't work With Error Message:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
2. Is it possible if the flag1 doesn't change value on update the trigger don't be enabled.
I mean if the flag1 has value=1 and then i run a command: update mixanaki set flag1=1 where id=.... in this case i don't want to be enabled the triger
Thanks a Lot and best Regards