Re: Urgent help please

From: Alan <alanpltse_at_yahoo.com.au>
Date: Fri, 22 Aug 2003 01:56:27 GMT
Message-ID: <3f45784a_at_news.comindico.com.au>


Candy is not included before she is a child of Alan. I only want to include the top level parent.

> > I have a table contains parent and children information,
> > this is not the actual table that I am working with but has similar
> > structure:
> >
> > ID Name Parent NoOfChildren Age
> > 1 John NULL 3 50
> > 2 Mary 1 0 20
> > 3 Peter 1 0 19
> > 4 David 1 0 30
> > 5 Alan NULL 1 60
> > 6 Candy 5 0 25
> > 7 Bobby NULL 0 35
> > 8 Vincent NULL 0 18
> Why is Candy not included? She's 25 and has no children. Same with
> David, 30 and no children. Anyhow, here is one attempt:
Received on Fri Aug 22 2003 - 03:56:27 CEST

Original text of this message