Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Outer Join....confused
Danny McNabb wrote:
> I have a query that looks like this
> select stvcnty_desc,
> count(distinct saradap_pidm)
> from saradap, spraddr, stvcnty
> where saradap_term_code_entry = 200210
> and saradap_styp_code = 'N'
> and saradap_pidm = spraddr_pidm
> stvcnty_code = spraddr_cnty_code(+)
> and stvcnty_code between 001 and 120
> group by stvcnty_desc
> --problem is there are counties I want to display that have a count
> of 0. I added the outer join and yet the county does not show up.
> What am I doing wrong....is this not the way outer joins work??
Then don't do an outer join. The point of an outer join is to NOT return records.
Daniel A. Morgan Received on Thu Jul 05 2001 - 14:23:35 CDT
![]() |
![]() |