Viewing 3 posts - 16 through 18 (of 18 total)
Ok, I got it, I need UPDLOCK and READPAST hints together. As explained here
Tutorial
So my statement should read.
WITH Requests AS
(
Select Top(3) *
FROM ReportRequest_R2 WITH (UPDLOCK, READPAST)
WHERE Status = 'O'
...
November 26, 2007 at 3:08 pm
#754295
thanks, that should help prevent deadlocking which was one concern, but I don't think it will stop the second call of the same stored procedure from reading the same rows....
November 26, 2007 at 2:59 pm
#754292
oops I meant to put this in the 2005 forum
November 26, 2007 at 2:34 pm
#754269