Guest User

Untitled

a guest
Feb 21st, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. INSERT INTO @MessageTable
  2. SELECT TOP(@BatchSize) q.id, ...
  3. FROM event_queue q WITH (updlock, rowlock, readpast)
  4. WHERE AND q.next_run <= Getdate()
  5. AND dequeue_time IS NULL
  6. AND q.espace_id IN (SELECT id FROM @ActiveEspace)
  7. ORDER BY q.next_run ASC
Add Comment
Please, Sign In to add comment