Enhancement: option to limit affected rowcount for DML

MarkL

Member
I would like to have a preference setting to limit the rows for a single DML statement to a specified limit (e.g., 1000 rows). If the limit is exceeded, show a message box such as "DML exceeded 1000 rows" and have continue or cancel (rollback and stop script) buttons.
 
I don't think this is possible because the DML is executed set based by the server. If you want to see where the server is in your DML statement, that would imply running it in smaller batches or even row-by-row (slow-by-slow). What you could do is run a select count(1) query with the same where predicates to see how many rows will be affected before you run your actual DML query.
 
Looks like a nice idea to enhance Command Window.

I often find myself in frustration after failure to provide correct input for CONN command or for a substitution variable. Command Window simply continues, with the old (wrong) connection and without connection errors highlighted. Also you cannot run your script until you connect to any db (even if the scripts starts with CONN statement).

So I could use some new commands.
May be something like 'pause script after next sql'.
 
Back
Top