-
-
Notifications
You must be signed in to change notification settings - Fork 873
Closed
Labels
bugSomething isn't workingSomething isn't workingt-sqlIssues related to the T-SQL/TSQL/Transact SQL dialectIssues related to the T-SQL/TSQL/Transact SQL dialect
Description
Search before asking
- I searched the issues and found no similar issues.
What Happened
I linted an ALTER TABLE DROP COLUMN
statement with 2 columns and sqlfluff returned Found unparsable section
Expected Behaviour
When running parsing or linting on ALTER TABLE DROP COLUMN
statements, properly formatted/written statements that list multiple columns should pass linting and parsing
Observed Behaviour
Parsing fails on the second column in the list, but passes if I only drop one column. However, this statement works in SQL Server without issue, and is valid according to SQL Server documentation
How to reproduce
Used SQL (drop_columns.sql)
ALTER TABLE table_name
DROP COLUMN column1, column2;
Steps
- I used the latest docker image to test it, on a Windows machine
- Execute
docker run --rm -v ${PWD}:/sql sqlfluff/sqlfluff:3.3.0 lint /sql/drop_columns.sql --dialect=tsql
- This is the error I get
L: 2 | P: 20 | PRS | Line 2, Position 20: Found unparsable section: ',
| column2;'
WARNING: Parsing errors found and dialect is set to 'tsql'. Have you configured your dialect correctly?
Dialect
tsql
Version
Docker image sqlfluff/sqlfluff:3.3.0
Configuration
None
Are you willing to work on and submit a PR to address the issue?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
korverdev
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingt-sqlIssues related to the T-SQL/TSQL/Transact SQL dialectIssues related to the T-SQL/TSQL/Transact SQL dialect