Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Department Chart

 
tichakunda gad mazvabo
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
what can be the problem with this sql it gives me an sqlException please help

Select staticdata.descr as deptname, hruser.deptname as deptid
from appraisal, measureimpact, measuretype
left join measure on measure.measuretype = measuretype.meastypeid
left JOIN hruser on hruser.userid = appraisal.appraisee
LEFT JOIN staticdata on staticdata.id = hruser.deptname
where hruser.deptname
and appraisal.lastupdated
AND appraisal.lastupdated
group by deptname
 
Campbell Ritchie
Marshal
Posts: 53115
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does that run from the command line? There seems to be something missing after WHERE; you ought to have = or > or < or IS NULL or something similar.
 
Rob Spoor
Sheriff
Posts: 20827
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell is right. SQL is not like C where anything can evaluate to a boolean.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!