Allow Format SQL to execute even when there are errors
If I'm halfway through writing a query and I want SQL prompt to format it in order to make it easier to finish what I'm doing, SQL prompt currently will fail because the query's not syntactically correct.
What I'd like is an option where I can tell SQL prompt I don't care if the queries I'm formatting are incorrect, just do your best with it and ignore any errors.
Unfortunately the way SQL Prompt parses SQL code currently does not allow for formatting when there are errors in the code.
Changing this would be a very large project because extensive changes to the parser would be required.
We are not planning on doing this at this time.
Thanks for your suggestion,
The Prompt Team
-
Simon Collis commented
I'm really disappointed by this response, as it limits the usefulness of this function severly.
I appreciate that it would be a large project, but you're badly letting down your customers here.
-
Simon Collis commented
That's bad news because it really limits the usefulness of SQL Prompt
-
Doug commented
Can this be merged with https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/13396299-support-formatting-sql-even-if-it-cannot-be-valida? I think they are the same suggestion.
-
Michael Hotek commented
I do this all of the time when I want to rip out all of the extraneous square brackets. But, I have to first correct every syntax error within the code before SQL Prompt will allow me to remove square brackets.
-
Jesse commented
Support formatting sql even if it cannot be validated, as best as possible. Sometimes we need to format the sql so that we can read it just so that we can see what is wrong. Other tools, such as Poor Man's TSQL formatter can do this.