File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and Relational Databases and the fly likes Department Chart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Department Chart" Watch "Department Chart" New topic
Author

Department Chart

tichakunda gad mazvabo
Greenhorn

Joined: Mar 28, 2008
Posts: 8
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
Sheriff

Joined: Oct 13, 2005
Posts: 43423
    
  32
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

Joined: Oct 27, 2005
Posts: 20050
    
  30

Campbell is right. SQL is not like C where anything can evaluate to a boolean.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
 
subject: Department Chart
 
It's not a secret anymore!