Format of Valid Selected Code when there is invalid code in the script (Take 2)
Version 9.2.5.6073
I would like to request that script validation be limited to the selected text during Format SQL.
This is a duplicate of a Completed feature (Bug) submitted on version 7. https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/16611622-formatting-of-valid-selected-code-when-there-is-in
I see recent comments on the original request but you may not be addressing since it is marked completed.
To Replicate:
Put 3 lines below in a new Window in SSMS
SOME BAD TEXT
GO
SELECT 1 FROM dbo.Person
Now select All of Line 3 after the GO Statement. Right-click, Format SQL
Should get following error:
"Error inserting semicolons" ...
Script parsing errors:
Line 1 Col: 1 - Incorrect syntax near SOME. ...
![](https://secure.gravatar.com/avatar/57bf42d01e0d672adc49afea7de0c92d?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)