Malcolm Greene wrote: > I have have table with 2 columns: cParent and cChild. cParent may > be a child of other cParents. Likewise cChild may be a cParent to > other children. > Is there a simple SQL query I can use to produce a list of all > cParent children through an arbitary depth? > Is there a way to capture the depth of each child so I could > visually indent parent/child hierarchies? > What happens if I have a circular reference, eg. a grandchild > that has its top parent as a child? (in theory this shouldn't > happen with my data, but ....) > Thank you, > Malcolm
Sounds like a treeview kind of scenario, Malcolm. I don't have a simple answer for you, but I know Doug Hennig had done some articles years ago in FoxTalk on hierarchial treeviews, iirc. Not sure if you have access to the old issues? _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.