mssql-cli icon indicating copy to clipboard operation
mssql-cli copied to clipboard

Allow multiline query with --query (-Q) parameter

Open KrzysztofKarol opened this issue 5 years ago • 0 comments

Hi!

Is it possible to run multiline query as input, e.g.:

PS> mssql-cli --integrated --server "SERVER_NAME" --query @"
>> select top 1 *
>> from $(Read-Host 'Table')
>> "@

?

Simple example:

PS> mssql-cli --integrated --server "SERVER_NAME" --query @"
>> select top 1 *
>> from TableName
>> "@
Msg 263, Level 16, State 1, Line 1
Must specify table to select from.

KrzysztofKarol avatar May 22 '20 11:05 KrzysztofKarol