You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When referencing a linked server in openquery in SQL Server, sqlfmt incorrectly formats linked server names that are in brackets (with uncommon characters). In my case, the name of the linked server is the server's IP address (xxx.xx.xxx.xx). It adds unnecessary spaces. The resulting SQL has a syntax error and does not run.
To Reproduce
select * from openquery([123.23.54], 'select * from my_table')
Expected behavior
select * from openquery([123.23.54], 'select * from my_table')
Actual behavior
select * from openquery([123.23 .54], 'select * from my_table')
Additional context
What is the output of sqlfmt --version?
sqlfmt, version 0.19.2
The text was updated successfully, but these errors were encountered:
SQL Server uses brackets in a unique way (compared to all other databases/warehouses). To support this we would need to create a new SQL Server-specific dialect that treats brackets like quotes. I'm unlikely to get that done any time soon, but PRs are welcome!
Describe the bug
When referencing a linked server in openquery in SQL Server, sqlfmt incorrectly formats linked server names that are in brackets (with uncommon characters). In my case, the name of the linked server is the server's IP address (xxx.xx.xxx.xx). It adds unnecessary spaces. The resulting SQL has a syntax error and does not run.
To Reproduce
Expected behavior
Actual behavior
Additional context
What is the output of
sqlfmt --version
?The text was updated successfully, but these errors were encountered: