Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL stmt Not working

 
Gorakshanath Pandey
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic