This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes ReportMatrix Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "ReportMatrix" Watch "ReportMatrix" New topic
Author

ReportMatrix

shumani edzani
Greenhorn

Joined: Oct 03, 2008
Posts: 9
Hi
My sql is like this and it gives me an nullPointerException what might be the problem please help

select org.orgName,appraisal.appraiser, appraisal.appraisee, staticdata.name as deptname
from org, staticdata, hruser, appraisal
where staticdata.id = hruser.deptname
and hruser.userid = appraisal.appraisee
group by hruser.deptname
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32704
    
    4
Welcome to JavaRanch

At a quick � second look at your SQL I can't see a problem with it; I presume it runs all right from the command line? A NullPointerException (NPE) doesn't occur in SQL code at all; it occurs in the Java code which you haven't provided. Go to the beginner's forum and do a search for NullPointerException and you find threads like this one, which has links to older threads. Go through them and you will know more about NPEs, to help you solve your present problem.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

I agree with Campbell - this problem is not caused by SQL.

Also, NPEs are more of a beginner's problem (although even experienced programmers can be haunted by them ).
Moving there.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: ReportMatrix