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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Select statement on 2 linked tables

Re: Select statement on 2 linked tables

From: Paul Quenneville <paulq_at_home.com>
Date: Wed, 10 Oct 2001 15:55:14 GMT
Message-ID: <Cb_w7.40484$5h5.18308881@news3.rdc2.on.home.com>


SELECT T1.val1, T1.val2, T2.val1, T2.val2 FROM T1, T2
 where T1.K1 = T2.K1(+)
 and T1.K2 = (T2.K2(+)

"Matthieu DEGLIN" <mdeglin_at_remove-me.partner.auchan.com> wrote in message news:9q1hdv$5le$1_at_reader1.imaginet.fr...
> I've 2 tables T1 et T2. Those tables are linked by two fields: T1.K1 /
T2.K1
> and T1.K2 / T2.K2.
>
> I'm trying to build a request that give me T1.val1, T1.val2, T2.val1,
> T2.val2 EVEN IF there isn't any lines in T2 linked to T1. In this case,
the
> fields T2.val1 and T2.val2 should be returned NULL.
>
> The following request doesn't work !
>
> SELECT T1.val1, T1.val2, T2.val1, T2.val2
> FROM T1, T2
> where T1.K1 = +(T2.K1)
> and T1.K2 = +(T2.K2)
>
> It returns only T1 values for which a T2 is linked to.
>
> Can somebody help me ?
>
> Thanks for Help.
>
>
>
>
Received on Wed Oct 10 2001 - 10:55:14 CDT

Original text of this message

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