Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent / child sorting problem
Message
 
 
To
14/06/2010 08:56:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01468767
Message ID:
01468772
Views:
41
>No I do not. Since I am interested in how to process this file in order, I am only concerned about its records.
>
>However, if a solution required that in order to work, I could certainly add the records (the file does not yet exist, but will shortly)
>
What do you have in ParentID field for parents (or do you plan to have).

If parents have NULLs in the ParentID field, it's easy to separate parents from children. However, if you want to order your records in the order by generations (Grandparents - parents - children - grandchildren) then I don't think there is a way in VFP to do so in one select statement. You need recursive function here and create a new table with extra field showing the number in the generations chain.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform