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: SQL question

Re: SQL question

From: Andreas Stephan <as.stedat_at_gmx.net>
Date: Thu, 18 Oct 2001 15:21:15 +0200
Message-ID: <9qmkt6$oeb5@byz672.bayer-ag.com>


Of course itīs possible, but you should invest some time learning sql.

select a.c1,a.c2,a.c3,b.c2,b.c3,c.c2
from a,b,c
where a.c1 = b.c1
  and a.c1 = c.c1(+)

This (the (+)) is called an "outer join". The query will return a row even if the corresponding row in
table C is nonexistent. In this case the returned values for the C table are set to NULL.

hth
Andy

"JP" <orajp_at_hotmail.com> schrieb im Newsbeitrag news:9qmjr4$914$1_at_mailgate.ikea.com...
> Hi all,
>
> I have three table like below which I want to join somehow, is this
> possible?
>
> Table A Table B Table C
> C1 C2 C3 C1 C2 C3 C1 C2
> 1 aa bbb 1 ccc ddd 1 eee
> 2 fff ggg 2 hhh iii 2 jj
> 3 lll mmm 3 nn ooo 4 ttt
> 4 ppp qq 4 rrr sss
>
> The result I wanna have:
> 1 aa bbb ccc ddd eee
> 2 fff ggg hhh iii jj
> 3 lll mmm nn ooo
> 4 ppp qq rrr sss ttt
>
>
> TIA /// J
>
>
>
Received on Thu Oct 18 2001 - 08:21:15 CDT

Original text of this message

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