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: Help writing SQL query

Re: Help writing SQL query

From: barry <bbulsara23_at_hotmail.com>
Date: Wed, 8 Dec 2004 07:27:18 -0000
Message-ID: <1102490829.12856.0@damia.uk.clara.net>


I will use something like this as the basis of my data massaging. A big thank you. This has turned out to be an interesting problem. Regards
Barry

"GQ" <dbaguy_ott_at_yahoo.com> wrote in message news:1102475659.120709.47030_at_z14g2000cwz.googlegroups.com...

>I believe the following query will produce the result you want.

> Select distinct TF1.fx1 AS familymember1
> from (select familymember1 as fx1, familymember2 as fx2
> from family
> union
> select familymember2 as fx1, familymember1 as fx2
> from family) TF1
> connect by nocycle prior TF1.fx1 in (TF1.fx1, TF1.fx2)
> start with TF1.fx1='Brian';
>
Received on Wed Dec 08 2004 - 01:27:18 CST

Original text of this message

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