I am using a update trigger in a table where after update
The trigger will insert the changed values in audit table
I am using like below in trigger.
select @valueold=symbol from Sec where id=(select id from deleted)
select @valuenew=symbol from Sec where id=(select id from inserted)
insert into audit(@valueold,@valuenew).
If I do update row by row it works fine.
But when I update with more than one row like below
update issuer set UpdDate=getdate()
where IssuerId in (1,1334)
I am getting the following Error.
Subquery returned more than 1 value.
This is not permitted when the
subquery follows =, !=, <, <= , >, >= or
when the subquery is used as an expression.
Can somebody help me out in this.
The trigger will insert the changed values in audit table
I am using like below in trigger.
select @valueold=symbol from Sec where id=(select id from deleted)
select @valuenew=symbol from Sec where id=(select id from inserted)
insert into audit(@valueold,@valuenew).
If I do update row by row it works fine.
But when I update with more than one row like below
update issuer set UpdDate=getdate()
where IssuerId in (1,1334)
I am getting the following Error.
Subquery returned more than 1 value.
This is not permitted when the
subquery follows =, !=, <, <= , >, >= or
when the subquery is used as an expression.
Can somebody help me out in this.