-- If more than one or none record is updated, do nothing IF @@ROWCOUNT <> 1 RETURN ... if update(begintime) or update(RoomID) or update(isCompleted) or update(isCancelled) begin IF (Select isCompleted from deleted) <> (Select isCompleted from inserted) BEGIN if EXISTS (Select * from inserted WHERE isCompleted =1) set @tcAction='Case has been Completed' else set @tcAction='Case has been unfinalized.' END end>Hi Sergey
>declare @tcAction varchar(500) >set @tcAction=' ' > >if update(begintime) or update(RoomID) or update(isCompleted) or update(isCancelled) > begin > if (Select isCompleted from deleted)=0 > begin > set @tcAction='Case has been Completed' > else > set @tcAction='Case has been unfinalized.' > end > end >