wood burning stoves 2.0*
The moose likes JDBC and the fly likes SQL stmt Not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "SQL stmt Not working" Watch "SQL stmt Not working" New topic
Author

SQL stmt Not working

Gorakshanath Pandey
Greenhorn

Joined: Feb 25, 2004
Posts: 11
sql = "INSERT INTO temper1 "
+"(SELECT erter, fy_tax, quarter, regional,activityregion,f_method "
+"FROM risma t1, fyquarter t2,cases t3 "
+"where t3.riscas= 'D' "
+"and (t1.cntl_no= t3.cntl_no "
+"and (t1.entry_21 between t2.stdate and t2.eddate "
+"or t1.closed_cc_dt between t2.stdate and t2.eddate)) )";
Some problem with syntax...
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Have you tried running the query in a database client before doing it in Java? It's much easier to debug SQL there first.
Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQL stmt Not working