Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Outer Join....confused

Re: Outer Join....confused

From: Daniel A. Morgan <Daniel.Morgan_at_attws.com>
Date: Thu, 05 Jul 2001 12:23:35 -0700
Message-ID: <3B44BEB7.E4A24D8@attws.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US