Click to See Complete Forum and Search --> : SQL Statement for Genealogy


leojunes
April 26th, 2001, 10:11 PM
I have this data

Do_MemberId Do_ChildID
A 0
0 1
1 3
3 4


Meaning A->0->1->3
And i want to produce an output similar to this

A 0
A 1
A 3
A 4
0 1
0 3
0 4
1 3
1 4
3 4

This is because A is the root of 0
A is the root of 1
A is the root of 3
A is the root of 4

This is a Genealogy report actUally
What is the SQL statement for this one.

Thanks