Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multilevel must use recursive?
Message
From
03/08/2001 05:29:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/08/2001 22:59:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00539221
Message ID:
00539282
Views:
16
>Hi.,
> I need to write a module that calculate bonus for member in multilevel marketing. It is a tree format. Is it possible to use SQL to do so ? Or only recursive can do it?
>
>Thank you

John,
VFP SQL doesn't seem feasible for it. You could use ADO shaping maybe as it permits hierarchical rowsets like a treeview. However I think you'd make it easier with nonSQL, recursive or nonrecursive approach (when saying nonrecursive I mean ways similar to recursion but not a true recursion - advantage it doesn't use stack and don't fail with nesting limit).
Also consider collecting an indiviual and its branches to a custom object. You could even create a treeview and walk nodes (slow and actually creating the nodes is doing the job itself).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform