Thursday, July 28, 2011

Sql scripts: SetVar, :r and spaces in file paths

Had some issues getting a SqlCmd variable working with the :r SqlCmd command.

Here is how I got it working finally:

:setvar databaseScriptFolder "C:\My Folder\"
:r $(databaseScriptFolder)"test script.sql"

No comments:

Post a Comment

Remember, if you want me to respond to your comment, then you need to use a Google/OpenID account to leave the comment.