Question: How can I delete rows in batches ? I’m getting the SQL0964C The transaction log for the database is full error, and don’t have the authority to increase the LOGSECOND parameter? How can I use SQL code to DELETE in batches of 1000? Answer: The FETCH FIRST commands can limit the amount of rows returned. Combining FETCH FIRST with DELETE allows you to manage the batch commit process. Check this example. The SELECT combined with FETCH FIRST statement returns batches of 1000. The DELETE command covers the recordset generated by the SELECT statement DELETE FROM (SELECT * FROM DB1.MY_DB... Read more →