I have one text file. This is the sql server script file. If i copy and paste in sql server and if i run it it will work fine. This script has "GO" statement.
The same file (i am getting as string) I am executing from query using SqlCommand cmd=new SqlCommand (string, sqlconnection). This is giving error. The error is "Syntax error near GO". So suppose if i removed GO it will work fine. So please guide me how to execute the text file in sql server through query without delete "GO" statement.