When I run an SQL script, I may get “Batch completed with errors”. When I scroll the messages pane, I can see the errors, but the only way I am aware of to see which statement caused it is by counting the SQL statements, which is totally undoable for even 50 lines of SQL. And my scripts can be much longer than that.
Is there a way to see which statement in the script caused the error?