On Wed, Oct 8, 2008 at 10:15 AM, Malcolm Greene <[EMAIL PROTECTED]> 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 -----------------------------------------
If you use constraints then you could pull this in no time. I don't think many people are doing that with VFP data though. -- Stephen Russell Sr. Production Systems Programmer Mimeo.com Memphis TN 901.246-0159 _______________________________________________ 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.