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

Home -> Community -> Usenet -> c.d.o.server -> Re: Outer-join w/ a subselect?

Re: Outer-join w/ a subselect?

From: Ethan Post <epost1NOepSPAM_at_yahoo.com.invalid>
Date: 2000/07/12
Message-ID: <0bc25be0.f370bae4@usw-ex0105-037.remarq.com>#1/1

When no matching record is found in table B you would get a null value, your salesid=max(salesid) confilct with this, you have to basically say:

where saleid = max(saleid) OR tableB.saleid is null

To tell Oracle that the null values are acceptable.

personally I would use the UNION statement to join a query with an inner join that returns sales to one with an outer join that shows the customers with no sales.

-Ethan

http://www.freetechnicaltraining.com/article_10.htm http://www.gnumetrics.com


Got questions? Get answers over the phone at Keen.com. Up to 100 minutes free!
http://www.keen.com Received on Wed Jul 12 2000 - 00:00:00 CDT

Original text of this message

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