microsoft / microsoft/go-sqlcmd

EXIT command not parsed in powershell using -Q

Open
#520 0 comments 0 reactions 1 assignee View on GitHub

@shueybubbles is already working on this.

Since Apr 16, 2024.

Dominant language
Go
Stars
595
Forks
91
Avg merge
9h 35m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.