Two Laptop Bag*
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
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: 38016
    
  22
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: 19653
    
  18

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
hibernate subqueries
are these join same
Sql statement
Left outer join
left outer join Vs right outer join