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

Home -> Community -> Usenet -> comp.databases.theory -> Re: How to find Brothers and Sisters?

Re: How to find Brothers and Sisters?

From: Cimode <cimode_at_hotmail.com>
Date: 3 Dec 2006 03:44:24 -0800
Message-ID: <1165146264.146210.68140@f1g2000cwa.googlegroups.com>


Explanations...
> create view as Q_B
> SELECT DISTINCT person.id
> FROM link INNER JOIN person ON link.child = person.id
> WHERE (((person.name)='John'))>>

--> This view gets the id of the parent for a specific sibling...

> select P2.name from person P2
> inner join link on Q_B B on P2.parent = B.id
> where P2.name <> 'John'

--> This view gets all sibling's for a specific parent id then restricts name or some operator..Cumulated view should be...

Hope this helps... Received on Sun Dec 03 2006 - 05:44:24 CST

Original text of this message

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