Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Left Outer Join and totals
I solved the issue. Another classic, "Once I posted it to the
newsgroup, I was determined to solve it." Our DBA said it was not
possible, because of the null rows, but of course it was. This code
works (pseudocode, fyi, so no DDL, just DML and also, Oracle 9i):
select Team.teamname, count(Report_ID)
from Team LEFT OUTER JOIN Report
ON Team.TeamID = Report.TeamID
group by team.teamname
Was hung up on the count(*)- that caused the bad results. running the count on report_id solved it.
thanks! Received on Mon May 22 2006 - 14:00:53 CDT