aspose 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 Java 8 in Action this week in the Java 8 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: 36599
    
  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: 19557
    
  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
Sql statement
hibernate subqueries
are these join same
left outer join Vs right outer join
Left outer join