Selecting specific bands of records in a table for update
Posted on 2013-12-15
I have a table with several thousand records. There are 4 fields.
The key field is [ID] which auto-increments. The other fields will hold information for printing labels. These three fields will be purged regularly.
I am using table this as a scratch table to print out batches of labels.
I need to select the first 10 records in a table and apply an SQL update.
I may then need to be able to select records 11 - 35 and 36 - 200 and do the same.
Since the table can hold several thousand records, I would prefer to not step through this record by record.
I cannot use the key field because this field will only remain contiguous until someone deletes a record.
How can I select the first 10 records for such an update? Then select records 11-35 etc?