EXIT command not parsed in powershell using -Q
amafernandes opened this issue · comments
amafernandes commented
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