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

TSql150Parser fails to parse INSERT statement with EXEC WITH RECOMPILE #1181

Open
ostandage opened this issue Mar 23, 2021 · 0 comments
Open

Comments

@ostandage
Copy link

A customer has reported a bug to us which was tracked down to the TSql150Parser. It appears that when parsing an an insert statement with an execute as the contents with execute options, the parser gives out errors.

This will parse correctly:
INSERT INTO foo EXEC bar
as will this:
EXEC bar WITH RECOMPILE

However the following will give errors:
INSERT INTO foo EXEC bar WITH RECOMPILE
INSERT INTO foo EXEC bar WITH RESULT SETS UNDEFINED
INSERT INTO foo EXEC bar WITH RESULT SETS NONE

Based on the SQL Server documentation for INSERT and EXECUTE, the latter ones should be valid syntax.

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

No branches or pull requests

1 participant