>Hi Ed,
>
>I am very interested in what you are saying. I still currently use FPD 2.6 so the GENXTAB mention hit home; I'll investigate that.
>
>The length of the query would be a problem, indeed. It's not particularly important that it be one SQL statement, just the speed at run time as well as ease of development.
>
For 2.6, you need to implement the inner joins using WHERE clauses (no inner join in 2.6, but WHERE can do what's needed without funky UNIONs like you would need for outer joins); in 2.6, the elimination of the multiple IIF()s is even more important, so that's the general direction I'd move...use the SELECT to cut the data down to size as fast as possible, and then crosstab the result set.