select t.*, row_number() over ( partition by t.Entity_Identifier order by t.Message_Sequence ) as seqnum from Process_Activity t (ROWLOCK) where t.Process_Id =
Is it possible for this select to retrieve a different number of rows based on whether it can lock a row or not?
We have a situation where the select will bring back 18 rows when there is another process performing an insert/update on the same table, but the select will bring back 33 rows (the correct amount) when the other process is not running.
I feel the
ROWLOCK is getting in the way. Why use a rowlock on a select?