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 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
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: 36468
    
  16
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: 19541
    
  16

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Department Chart
 
Similar Threads
left outer join Vs right outer join
Left outer join
hibernate subqueries
Sql statement
are these join same