Here is my code and I am looking for best approach without locking records while updating.
Declare @maxRowId int Set @maxRowId=0 Declare @rowIndex int Set @rowInd