BUG: Formating queries fails if GO statement is not on a line of its own
gerthauan
Posts: 9 New member
in SQL Prompt
Hi
It seems that the formatting fails when there is a GO statement on the same line as another query.
I get an error trying to format the following query:
SELECT * FROM Felles.DimAlder da; GO
I am on version 10.13.8.680 on SSMS 19
It seems that the formatting fails when there is a GO statement on the same line as another query.
I get an error trying to format the following query:
SELECT * FROM Felles.DimAlder da; GO
I am on version 10.13.8.680 on SSMS 19
Best Answer
-
Jon_Kirkwood Posts: 441 Gold 1
Hi @gerthauan
Thank you for reaching out on the Redgate forums.
This looks to be expected behaviour in handling a GO command on the same line as a T-SQL statement.
From Microsoft;
A Transact-SQL statement cannot occupy the same line as a GO command. However, the line can contain comments.
Running your command without SQL Prompt brings up the same error directly in SSMS.
I don't believe this is a bug in SQL Prompt but a genuine error passed through from SSMS
Jon Kirkwood | Technical Support Engineer | Redgate Software
Answers