Meaningless Drivel is fun!
The moose likes JDBC and Relational Databases and the fly likes SQL stmt Not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL stmt Not working" Watch "SQL stmt Not working" New topic

SQL stmt Not working

Gorakshanath Pandey

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

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.
I agree. Here's the link:
subject: SQL stmt Not working
jQuery in Action, 3rd edition