devvcat / ssms-executor

Execute current statement extension for SQL Server Management Studio (SSMS)
MIT License
70 stars 13 forks source link

The extension fails when there is an error elsewhere on the page. #16

Closed manngo closed 1 year ago

manngo commented 2 years ago

I have no idea what’s happening on the inside, but the extension doesn’t appear to be limited to the current statement. For example, when I have something like the following:

select;
select * from books;
select * from customers;

and try to run just the last statement (ctrl-shift-E) the error on the first line stops the last line from running.

Is this something that can be fixed?

devvcat commented 2 years ago

Hi @manngo,

the extension first tries to validate/parse the whole query, and then extracts the separate sql statements. If there is an syntax error, it fails to parse the statements and the execution is stopped.

I might look into this, as it annoys me too.