>Let's say I have a table with 950 records. I want to select the first 100, do something, the next 100, do something, etc., then select the final 50, do something. It is the same something, I just only want to process 100 at a time.
lastValue = 0
select top 100 * from yourTable where yourPrimaryKey > m.lastValue order by yourPrimaryKey
* ...
* and assign max primaryKey in this set to lastValue
Cetin