"Fatal scripting error" when parsing SQLCMD query
0
votes
1
answer
1117
views
*Similar issue seen [here](https://dba.stackexchange.com/questions/223664/sql-command-mode-unable-to-run-command).*
I am trying to run the following command from SSMS running in SQLCMD mode.
:r C:\dev\test scripts\sample.sql
But I get the following error:
A fatal scripting error occurred.
Incorrect syntax was encountered while parsing :r .
I have checked the file, the line endings are appropriate for the Windows machine, and the batch separator matches the settings. What else can I try to run this?
Asked by mft25
(111 rep)
Oct 3, 2023, 10:16 AM
Last activity: Mar 6, 2024, 12:02 AM
Last activity: Mar 6, 2024, 12:02 AM