Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Outer-join w/ a subselect?
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