Hi
I have a table - Subscribers - which contains 42000 entries, 30000 of which match a certain criteria. I want to select all these results in groups of 10000 (so that my scripts don't timeout). Obviously I can select TOP 10000, but how do I get the other 2 groups?
I've added an identity column, but if I select with (the criteria I'm using) and WHERE ID BETWEEN 10000 AND 20000, I'll get substantially fewer than 10000 entries as many entries with IDs between those numbers won't match my criteria. What can I do?
I have a table - Subscribers - which contains 42000 entries, 30000 of which match a certain criteria. I want to select all these results in groups of 10000 (so that my scripts don't timeout). Obviously I can select TOP 10000, but how do I get the other 2 groups?
I've added an identity column, but if I select with (the criteria I'm using) and WHERE ID BETWEEN 10000 AND 20000, I'll get substantially fewer than 10000 entries as many entries with IDs between those numbers won't match my criteria. What can I do?