Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

SQL files execute : Incorrect syntax near ‘go’.

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

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

How to Run Executable & Native Programs in an Ant Script

How to Run Executable & Native Programs in an Ant Script Apache Ant allows you to run executable files (.exe) and native programs using the <exec> task….

Read More

What is Apache Kudu?

Apache Kudu is a free and open source columnar storage system developed for the Apache Hadoop. It is an engine intended for structured data that supports low-latency…

Read More

What is Apache Druid?

Apache Druid is among the most popular open-source Apache Druid is a real-time analytics database designed for fast slice-and-dice analytics (OLAP). As pre-existing open-source databases like Relational…

Read More

Apache Ant

Ant is a Java library and command-line tool. Ant’s mission is to drive processes described in build files as targets and extension points dependent upon each other….

Read More

Introduction of Apache Ant

Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and…

Read More

Apache Ant: A Build Tool

Apache Ant (or simply Ant) is an XML-based build scripting language used heavily by the Open Source community. Ant automates tasks such as compiling source code, building deployment…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x