Re: Outer join
Date: Sat, 21 Jul 2001 21:55:58 GMT
Message-ID: <3B30D8FB.C92E2C38_at_attws.com>
vidas wrote:
> I have a question about outer-join. I have such kind of query:
>
> Select t1.sdate, t1.acop, t1.bcop, t1.min, t2.price
> from store t1, invsell t2
> where
> t1.acop =t2.opname and
> t1.codadest (+) =t2.destname and
> t1.cod (+) =t2.type and
> t2.validdate =
> (select max(validdate) from invsell t4
> where
> t2.opname=t4.opname and
> t2.destname=t4.destname and
> t2.networktype=t4.type and
> t4.validdate < t1.sdate)
>
> I would like to have all rows from the table store and matched from
> invsell. Some suggestions?
[Quoted] You have your subquery all mixed up so I'm not sure exactly what you want it to do. You can not mix table aliases from the outer query into the inner query.
And your outer joins are on the wrong side of the equals sign for what you say you are trying to accomplish.
Daniel A. Morgan Received on Sat Jul 21 2001 - 23:55:58 CEST
