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

Support for WITH () Clause #10

Open
fprima opened this issue Sep 6, 2019 · 0 comments
Open

Support for WITH () Clause #10

fprima opened this issue Sep 6, 2019 · 0 comments

Comments

@fprima
Copy link

fprima commented Sep 6, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant