5

In MS SQL Server Management Studio in SQLCMD Mode I use this script to run another script:

:setvar path "C:\workspace\scripts\scripts\"

:r $(path)'VERSIONS.sql'

But it gets this error:

A fatal scripting error occurred. The file specified for :r command was not found.

VERSIONS.SQL is definitely in the specified folder. Why is this script not working when I run it?

EDIT: Something to note. The database I'm running this script against is not on my local machine. (I hope that's not the reason this isn't working)

ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122
Graham
  • 5,488
  • 13
  • 57
  • 92

1 Answers1

8

I just solved my own problem. I changed the single quotes around VERSIONS.sql to double quotes and it worked.

Why are they not interchangeable?

Graham
  • 5,488
  • 13
  • 57
  • 92