Re: Outer join

From: SeredinaMy <srayzberg_at_hotmail.com>
Date: Sat, 21 Jul 2001 21:55:59 GMT
Message-ID: <k_4Y6.3427$8P6.636230_at_typhoon1.gnilink.net>


vidas,

can you provide a comprehensive sample of the data in your tables? otherwise it's difficult to understand what is your goal. it might be that you don't need the (+)join whatsoever.

Sergey
Daniel A. Morgan <Daniel.Morgan_at_attws.com> wrote in message news: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?
>
> 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:59 CEST

Original text of this message