Skip to content

[Bug]: Incorrect Syntax Error marked on Azure Synapse Analytics CTAS tables #19672

Open
@samgusick

Description

@samgusick

Description

I build CTAS tables using Azure Synapse Analytics syntax which is valid T-SQL in my version of Azure SQL Server. While my code runs as intended with this extension, the syntax for my CTAS tables is always marked as incorrect. I expect that even when using Azure Synapse Analytics syntax, the extension will not flag this syntax as incorrect. SSMS does not mark this syntax as incorrect, I don't believe this extension should either.

For more info on CTAS table syntax in Azure Synapse Analytics, check this documentation

Steps to Reproduce

Try to create a CTAS table using Azure Synapse Analytics Syntax. For Example:

CREATE TABLE FactInternetSales_new WITH ( CLUSTERED COLUMNSTORE INDEX, DISTRIBUTION = HASH(ProductKey), PARTITION ( OrderDateKey RANGE RIGHT FOR VALUES ( 20000101,20010101,20020101,20030101,20040101,20050101,20060101,20070101,20080101,20090101, 20100101,20110101,20120101,20130101,20140101,20150101,20160101,20170101,20180101,20190101, 20200101,20210101,20220101,20230101,20240101,20250101,20260101,20270101,20280101,20290101 ) ) ) AS SELECT * FROM FactInternetSales;

Will result in syntax errors:

Image

Affected Area

  • Connection dialog
  • Query results panel
  • Query editor
  • Object Explorer
  • Table Designer
  • Schema Compare
  • Schema Designer
  • Local container
  • GitHub Copilot integration
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the affected area

No response

Environment Information

  • VS Code Version: 1.101.2
  • MSSQL Extension Version: 1.33.0
  • Operating System: Windows 11 Pro
  • Connection Type: SQL Database in Azure SQL Server 10.0.39712.0

Confirmation

  • I have searched existing issues and couldn't find a match
  • I want to work on this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions