need a SELECT script.
Posted in 1998
DK — — source: Informix-list mailing list archive (1991-1998)
I've a table which represents a tree structure: child_id | parent_id 2 1 3 2 4 3 8 3 5 4 6 4 9 8 I need to select the 1. parent 2. child nodes of any given node. Like if I choose to find the parent of node=9 then i should get the results as 8 3 2 1 and if I want to get the children of the node=3, then my result should be like 4 5 6 8 9 (I can read the results off the cursor?) I need a select query/script which can do this work and I can tune it to my requirements. Any suggestions will be welcome and if possible please e-mail me a copy of the solution at dk@pcisys.net thanks!