Is there something like a directive which I can use in a script to force SSMS to enable/disable SQLCMD mode?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
As has been said there isn't a way, however one thing we do is to include in our script header a quick check to determine whether SQLCMD mode is on (and terminate the script if not):
But you can always run in SQLCMD mode and have T-SQL in it though