>Thanks, so you say that i most divide this SQL?
>Luis
It usually helps. Let me give you an example. I had a single query with ca. 9 tables, which took 50 seconds (over the network). Changing it to several queries (adding one table at a time, to the previous results), made it execute in ca. 2 seconds.
After that, I have experimented, now and then, with other options (for instance, the FORCE clause, to make sure VFP combines tables in the order I want), but the results have not been satisfactory.
From that point on, I started redesigning several previous selection commands - but especially for new reports, I always used several SQL commands.
In summary, I strongly suggest that you try splitting the SQL, and check the time it takes to produce the result.
Saludos,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)