Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling 1:M:M with views
Message
From
21/06/1999 08:19:00
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
 
To
17/06/1999 23:03:03
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00184085
Message ID:
00232046
Views:
21
Gar,

>The grandchild query went something like this.
>
>Select * from grandchild where childkey in (select childkey from child where parentkey=parent.parentkey)
>
>A greatgreatgrandchild query would have been something like:
>
>select * from greatgrandchile where grandchildkey in (select grandchildkey from grandchild where childkey in (select childkey from child where parentkey=parent.parentkey).
>

I would have to agree that this is quite possibly the best n-level solution I've seen, if you ignore (!) VFP's limits on nesting and also ignore possible performance penalties.

Usually, when I run across something like this -- an unsolvable general case -- I try to engineer around it. Especially since only a few people responded, I have to believe most people don't run into it, again suggesting they are engineering around it, most likely without a second thought.

However, I have not been able to see my way around the example that caused me to examine this in the first place. Example: Business Rules state that a sales order cannot be saved without line items. In order to accept the save-parent-first philosophy, this rule has to go. Ho hum, probably not the end of the world...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform