Skip to content
This repository was archived by the owner on Oct 8, 2019. It is now read-only.
This repository was archived by the owner on Oct 8, 2019. It is now read-only.

Support for WITH () Clause #10

@fprima

Description

@fprima

SQL Parser is not able to correctly parse WITH clauses. When I try to analyze the following MS SQL statement, I am not getting the WITH node in the JSON output. When using the SQL Parser demo I get: 'syntax error, state:686(10101) near: PersonCTE(1,8)'

WITH   PersonCTE (BusinessEntityID, FirstName, LastName)
AS     (SELECT Person.BusinessEntityID,
               FirstName,
               LastName
        FROM   Person.Person
        WHERE  LastName LIKE 'C%'),
PhoneCTE (BusinessEntityID, PhoneNumber)
AS     (SELECT BusinessEntityID,
               PhoneNumber
        FROM   Person.PersonPhone)
SELECT FirstName,
       LastName,
       PhoneNumber
FROM   PersonCTE
INNER JOIN
PhoneCTE
ON PersonCTE.BusinessEntityID = PhoneCTE.BusinessEntityID

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions