General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only