Skip to content

-v does not work when SQL file has comments #114

@zijchen

Description

@zijchen

I have a SQL file like this

-- Comment
DROP DATABASE [$(DbName)]

When I run sqlcmd -i input.sql -v DbName=MyDatabase, I get error

Database '$(DbName)' does not exist. Make sure that the name is entered correctly.

If I remove the comment on line 1, the script executes successfully.

This used to work with the old sqlcmd.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions