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

select from @local_var fails to parse #1450

Open
joshua-auchincloss opened this issue Oct 1, 2024 · 1 comment
Open

select from @local_var fails to parse #1450

joshua-auchincloss opened this issue Oct 1, 2024 · 1 comment

Comments

@joshua-auchincloss
Copy link

joshua-auchincloss commented Oct 1, 2024

Noting the engine fails to parse valid local variables, despite being previously declared. E.g query below to highlight this (engine = mssql)

declare @a int
set @a = 2
select @a * 4

Raises end of statement error (found @a at Line 3, column xxx)

@wugeer
Copy link
Contributor

wugeer commented Oct 29, 2024

What's more interesting is that after I swapped the order of the SQL statements, the result was successfully output.
image
image
image
image

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

2 participants