How can you compress / group by on a crosstab query when column names are unknown

D

Dan V.

How can you compress / group by on a crosstab query when the amount of
column names are unknown ?

If I run a crosstab query for example I may have 1, 2, 3 or 4 quarters
listed as column names.

If, for example, there are may employees selling may products at different
quarters in the year - and I would like to have just one row in the crosstab
query per employee showing total product sales per quarter.

My first crosstab query summarized in quarters each product sold per
employee and now I want to summarize that crosstab query to show per quarter
the total product sales per employee?



thanks.
 
J

Jerry Whittle

Create a query that groups by employee, quarter, and sum of products sold.
Save it. Base a crosstab on this new query.
 
D

Dan V.

In my case, I actually don't know the amount of quarters, it could be
several years worth as I am looking at quite a few tables.
I know that a group by requires all fields to be present in the select
clause and I don't know how many quarters to put in the SQL statement...
 
Top