• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQL stmt Not working

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic