Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ReportMatrix

 
shumani edzani
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48642
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20510
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic