Getting error in SQL Server
Incorrect syntax near "GO"
when I copy page script from notepad.
But if I write "GO" instead of copy paste in SQL Server Management Studio then I don't get that error
Notepad file: download file
Getting error in SQL Server
Incorrect syntax near "GO"
when I copy page script from notepad.
But if I write "GO" instead of copy paste in SQL Server Management Studio then I don't get that error
Notepad file: download file
As I said in a comment: the only difference is a Cr vs CrLf. I didn't expect it to make a difference, nor have I ever seen it make a difference. Queries with Cr or Lf or CrLf have always worked perfectly fine for me. However, apparently, the sql parser sometimes does have a problem with Cr. (Based on the answers to this question). So I guess a replace is what you need to do, unpleasant as it is.