I try and run update scripts for my software in this format:
osql.exe -i "path\to\script" -U "user" -P "Password" -S "Location of sqlserver" -d "Database name" -n -b
Most of the scripts are in the same format and all end in GO. A lot of them run just fine, but all the time random scripts return an error and won't run. The error is "Incorrect syntax near '∩'. on line 1. The script might be as simple as just an INSERT, but it is always this error. I can't seem to find anything online that has been able to help me. Can anyone provide any insight?
The scripts run just fine manually. Also something interesting is if I create a new text document and paste the script in the new file and change it to the .sql and run that file then it works just fine. I'd just do this for all the 'broken' scripts, but it continues to happen to new ones and will happen on changed ones as well eventually.