I’m trying to prepare some data for deletion by a 3rd party, and unfortunately they can only process data in batches of 2000 records. I have 100k records and may need to divide-and-export this data several more times, so I’d like to automate the process somehow.
Is there a reasonably easy way to do this using SQL Server 2008? I’m not running a complex query — it’s not too far off from SELECT PKID FROM Sometable ORDER BY PKID — and while I can probably do this using a cursor, I’d like to know if there’s a better way.
1 Answer