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

EXIT command not parsed in powershell using -Q #520

Open
amafernandes opened this issue Apr 5, 2024 · 0 comments
Open

EXIT command not parsed in powershell using -Q #520

amafernandes opened this issue Apr 5, 2024 · 0 comments
Assignees

Comments

@amafernandes
Copy link

amafernandes commented Apr 5, 2024

In go-sqlcmd 1.6.0 the powershell script bellow, produces and error, this is output of variable $result:

Msg 102, Level 15, State 1, Server ., Line 4
Incorrect syntax near ':'.

Running the same script using ODBC sqlcmd works properly.

$result = sqlcmd -b -X1 -E -W -h -1 -Q "
Select 2;

:EXIT(SELECT 200)"

echo $LASTEXITCODE
echo $result
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