Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The file specified for :r command was not found

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)

like image 751
Graham Avatar asked Feb 13 '23 11:02

Graham


1 Answers

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?

like image 92
Graham Avatar answered Feb 15 '23 06:02

Graham