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

Double exclamation within text expression with some parenthesis deal as sqlcmd instruction #514

Closed
AndreyShvidky opened this issue Mar 11, 2024 · 0 comments · Fixed by #516

Comments

@AndreyShvidky
Copy link

Got script with such an expression (sorry, but Code applet eats carriage returns)

print ('Some text
!! Some more text')

SQLCMD version 1.6.0 gives error
"Some" is not recognized as an internal or external command, operable program or batch file. Msg 105, Level 15, State 1, Server SRV, Line 1 Unclosed quotation mark after the character string "Some text". Msg 102, Level 15, State 1, Server SRV, Line 1 Incorrect syntax near "Some text".

I found it in

raiserror ('Some text
!! Some more text', 10, 0)

Nevertheless

print 'Some text
!! Some more text'

works fine.

So the problem not just in two exclamations in new line, but using parenthesis as well.

Previous versions works fine (I mean old SDK versions installed with SQL server or other way in C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn).

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

Successfully merging a pull request may close this issue.

1 participant