>>VFP will only join two tables at a time anyway.
>
>I'm sure you expected someone to ask this, but what do you mean by that?
Let's make this simple:
Given that you want to join tables A, B, and C, VFP will only join two tables at a time. So, you would get something like:
A + B = D
D + C = E
Note that the first join (A+B) could be fully optimized. However, D won't have an index, so the second join (D+C) will at best, only be partially optimized. One trick that *may* (I emphasize may) speed up this type of query is to do SELECT one, then index D, then do SELECT two. I think too often we get caught up in trying to get all our data in a single SELECT statement when multiple ones will do the job.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer