Delete and Select Concurrency in Different Stored Procedures
===

This may be a dumb question, but I'm not really sure if the way I'm approaching the creation of these stored procedures could be causing any issues.

My select stored procedure looks like so:

    ALTER PROCEDURE [dbo].[GetSRPsToProcess]
    	@CurrentTime DateTime
    AS
    BEGIN
    	BEGIN TRAN Tran1
    		Select TOP 20 *
    		From SRPQueue WITH (updlock, ROWLOCK, readpast)
    		WHERE SRPQueue.TimeToDequeue <= @CurrentTime AND SRPQueue.Status = 'Pending'
    		ORDER BY SRPQueue_Index	
    	COMMIT
    END

My delete procedure looks like so (and will eventually also contain an insert to a log table):

    ALTER PROCEDURE [dbo].[DequeueRelevantSRPs]
    	-- Add the parameters for the stored procedure here
    	@SRPQueue_Index int,
    	-- @TimeDeleted datetime
    AS
    BEGIN
    	BEGIN TRAN Tran1
    		Delete
    		FROM SRPQueue
    		WHERE SRPQueue.SRPQueue_Index = @SRPQueue_Index
    	COMMIT
    END


Would the best practice to avoid the issue of my DequeueRelevantSRPs stored procedure attempting to delete an already selected, locked row (and failing), be to use the SRPQueue.Status variable? 

This would be nice, as I could have a few different statuses (pending, processing, ready, failed) and I'd just need an additional AND SRPQueue.Status = 'Ready' check. Is there another method that can make sure the delete succeeds despite the potential lock on it?
