-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error on correct sql text with nested JOINs #288
Comments
I was surprised to see these two ON clauses stacked together like this, without any grouping hint, so I just checked, and can confirm this is indeed valid T-SQL - so this is indeed a bug. Simplified reproduction:
If you move the second ON clause to its join, the query parses and formats normally (and as far as I can tell, is semantically/functionally identical), so this may serve as a sufficient workaround depending on the origin and modifiability of the problem query:
If the general structure is intentional, another minimal fix (although the resulting query has some formatting legibility issues, I would argue) is to provide a grouping hint to the ON clause:
I am curious though, about two things:
|
|
I use command line tool SqlFormatter for Windows. And for text
I get
The text was updated successfully, but these errors were encountered: