Skip to content Skip to sidebar Skip to footer

Incorrect Syntax Near Go With Pypyodbc

I am using the pypyodbc library to establish a connection to a SQL Server 2008 R2 database and every time I try to execute a .sql file I encounter the following error: pypyodbc.Pr

Solution 1:

GO is a batch separator used by sqlcmd and SSMS. It's not a T-SQL operator.

Considering you're using an application to connect to SQL Server, declare your database in the connection string, by adding database="SL_Site1_App", and then remove the USE and GO statements in your SQL Statement.

Post a Comment for "Incorrect Syntax Near Go With Pypyodbc"