I am trying to run update scripts for my software in this format:
osql.exe -i "path \ to \ script" -U "user" -P "Password" -S "Location sqlserver" -d "Database name" -n -b
Most scripts are in the same format and all end with GO. Many of them work fine, but all random scripts return an error and will not work. Error: โThe incorrect syntax next toโ โฉ โin line 1. The script may be as simple as INSERT, but always this error. I can not find anything on the Internet that could help. Can I give someone representation?
Scripts are executed only manually. It is also interesting if I create a new text document and paste the script into a new file and change it to .sql and run this file, then it works fine. I just did it for all the โbrokenโ scripts, but it still happens with new ones and will happen with changed ones as well, and in the end.
source share