You have two sequence columns in your table - do either of them have gaps? If one of them is guaranteed to have no gaps, then join the table to itself, like this;
SELECT *
FROM Table a
LEFT JOIN Table b ON b.ID = a.ID + 1
Have a look at the results. If you are not sure how to proceed, post back.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]