| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Urgent help please
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 Thu Aug 21 2003 - 20:56:27 CDT
![]() |
![]() |