Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSERT INTO @MessageTable
- SELECT TOP(@BatchSize) q.id, ...
- FROM event_queue q WITH (updlock, rowlock, readpast)
- WHERE AND q.next_run <= Getdate()
- AND dequeue_time IS NULL
- AND q.espace_id IN (SELECT id FROM @ActiveEspace)
- ORDER BY q.next_run ASC
Add Comment
Please, Sign In to add comment