Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: add outer/cross apply for mssql #2296

Closed
pershmaj opened this issue Jan 13, 2025 · 1 comment
Closed

feature request: add outer/cross apply for mssql #2296

pershmaj opened this issue Jan 13, 2025 · 1 comment
Assignees
Labels
invalid This doesn't seem right
Milestone

Comments

@pershmaj
Copy link

pershmaj commented Jan 13, 2025

Describe the bug
sql parsing fails on outer/cross apply statement

Database Engine
MSSQL

To Reproduce
select

r.[Insight ID]

from ent.[Master Insights Recipients__IQ] as r

outer apply
(select
m.[Insight ID]

from ent.[Master Insights Recipients__IQ] as m) as kek

-the node-sql-parser version 5.3.3
-the node version 20

@pershmaj pershmaj changed the title feature request: add outer/cross apply for mysql feature request: add outer/cross apply for mssql Jan 30, 2025
@taozhi8833998 taozhi8833998 added the enhancement New feature or request label Feb 23, 2025
@taozhi8833998 taozhi8833998 added this to the 5.3.7 milestone Feb 23, 2025
@taozhi8833998 taozhi8833998 added invalid This doesn't seem right and removed enhancement New feature or request labels Feb 23, 2025
@taozhi8833998
Copy link
Owner

@pershmaj Please upgrade to the latest version ,and try codes below:

const { Parser } = require('node-sql-parser/build/transactsql')
const parser = new Parser()
const sql = `select

r.[Insight ID]

from ent.[Master Insights Recipients__IQ] as r

outer apply
(select
m.[Insight ID]

from ent.[Master Insights Recipients__IQ] as m) as kek

`
const ast = parser.astify(sql)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants