* sample data TEXT TO m.lcData noshow 3 LUCIA 4 3 JOHN 5 3 SANDRA 6 4 CARLOS 7 4 NANCY ENDTEXT STRTOFILE(m.lcData,'tmpdata.txt') CREATE CURSOR mytree (ID i, PARENTID i, NAME c(10)) APPEND FROM tmpdata.txt TYPE DELIMITED WITH "" WITH blank ERASE ('tmpdata.txt') * sample data SELECT t.Name, p.Name as parent, c.Name as child ; FROM myTree t ; LEFT JOIN myTree p ON p.ID = t.parentID ; LEFT JOIN myTRee c ON c.parentID = t.IDHowever on the long run such structures need additional info like rootID (topmost id of a particular node), level (how deep in tree), position (order position of children within a particular parent node). Those additional info make it easy to place this info say into a treeview within order you want or encode/decode text data like this into a table and tree:
Lucia Lucia\John Lucia\John\Carlos Lucia\John\Nancy Lucia\SandraMy .2 cents.