Number of rows returned more than required | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Number of rows returned more than required

Hi, I’ve got a select statement that picks up a record. I did a count, and confirmed that it returns only 1 record: select count(*) from tVisitMaster where iidvm = 838460
But when I do the below update script, update tVisitMaster set bIsDeletedVM = 1
where iidvm = 838460 it returns:
(0 row(s) affected)
(2 row(s) affected)
(0 row(s) affected)
(1 row(s) affected)
(1 row(s) affected)
(1 row(s) affected) I’m very very puzzled by why is this so. Is anyone able to enlighten me? Thanks!
Set up Profiler and execute it again, or run it like this: SET STATISTICS IO ON
SET STATISTICS PROFILE ON
update tVisitMaster set bIsDeletedVM = 1
where iidvm = 838460
SET STATISTICS IO OFF
SET STATISTICS PROFILE OFF My guess is that you have a couple indexes on the table. MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Hi, yes there are something extra there. I found a trigger that goes on to update 5 other tables if this field is being updated base on the message generated by the profiler. Thanks for the help!!
]]>