saiki created the topic: SQL files execute : Incorrect syntax near ‘go’.
Getting below issue when trying to run the ant script.
I am trying to run few sql files from the folder through ant script in which I configured the “jtds-1.2.5.jar”.
Unable to run the GO statment in the sql file. But able to execute same file it through sql studio with out any error.
************************************************** **
************************************************** **
ERROR:
************************************************** **
java.sql.SQLException: Incorrect syntax near ‘go’.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnos tic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(Td sCore.java:2820)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCor e.java:2258)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(T dsCore.java:632)
at net.sourceforge.jtds.jdbc.JtdsStatement.processRes ults(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL (JtdsStatement.java:546)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeImp l(JtdsStatement.java:723)
at net.sourceforge.jtds.jdbc.JtdsStatement.execute(Jt dsStatement.java:1160)
at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLE xec.java:775)
at org.apache.tools.ant.taskdefs.SQLExec.runStatement s(SQLExec.java:751)
at org.apache.tools.ant.taskdefs.SQLExec$Transaction. runTransaction(SQLExec.java:1055)
at org.apache.tools.ant.taskdefs.SQLExec$Transaction. access$000(SQLExec.java:985)
at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLE xec.java:653)
rajeshkumar replied the topic: Re: SQL files execute : Incorrect syntax near ‘go’.
ave you tried executing sql statement on command line. may be sql studio has some setting which is helping to get it execute but not the ant script.
please refer these url as well…
forums.oracle.com/forums/thread.jspa?threadID=1323298
stackoverflow.com/questions/6614544/how-…on-using-jdbc-driver
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
saiki replied the topic: Re: SQL files execute : Incorrect syntax near ‘go’.
I Have set delimetr to GO in ant script
Then it worked
- Discover the Heart of India with Mera Apna Bihar - December 20, 2024
- Experience the Pulse of Bangalore with Bangalore Orbit - December 20, 2024
- Discover the City of Lakes with Bhopal Orbit - December 20, 2024