Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Friday afternoon toughie - tree endless loop
Message
From
03/02/2019 07:14:55
 
 
To
01/02/2019 14:23:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012 R2
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01665871
Message ID:
01665879
Views:
50
>Hi all,
>
>I have run into a tough problem that perhaps someone else has run into or where conceptually they have done something similar.
>
>The table is of insurance company names. From the beginning the client said that there would be head offices and then branch offices. And the branch offices can also have branches etc. And the companies can be named differently (different operating companies). And the client would like to just see all the companies in one table for browsing. So I set up the table to have a pointer back to a parent company. It has worked well over the years (and no arguing over the design at this point - it has worked...although I might be open to a new design in the future if they move to a new backend).
>
>Here is the table example:
>
>Company_ID ParentCoID CompanyName City etc
>
>7684 0 Intact Insurance Toronto
>7685 7684 Intact Insurance Waterloo
>etc.
>

If you can do a topological sort ( https://en.wikipedia.org/wiki/Topological_sorting ) then it means that you have no cycles
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform