>Thank again for the response. I have executed the query in vfp 8.0 and works fine for small tables, if Use tables of 16000 records I get the following error message: SQL expression too complex. Do you know why?
>
No, that doesn't make much sense to me. The only thing I can guess is there may be some kind of problem with the data. Maybe there's a complex index expression that Rushmore is trying to use. You could try adding NOOPTIMIZE to the command. It will be really slow, but you'll know if Rushmore is causing that problem or not.
>And one more question: do you know some good book about sql which helped you or have you learned this by experience?
>
I've learned mostly from experience. I've been doing SQL in FoxPro since version 2.0. There's a whole chapter dedicated to VFP's SQL implentation in Whil Hentzen's "Fundamentals" book. (
www.hentzenwerke.com ) You might want to start with that.