View Full Version : Crosstab Query Problem


damian
11-12-2005, 07:54 AM
I’m struggling with the following cross tab query:

ID Date Product Net Weight
1 1/11/05 Prod A 1000
2 1/11/05 Prod A 3000
3 2/11/05 Prod B 1500
4 2/11/05 Prod C 1200

Product Type is grouped according to the individual types for that particular date and quantities summed.

I’ve achieved this but I’d also like to add the weight of Prod A and Prod C together for each day, grouping them together with a sum of their weights.

I suspect that a IIf or SQL statement may be the way forward but I’m unable to make any headway.

gromit
11-17-2005, 09:39 PM
Hi Damian -

I think that the best approach in these sort of situations is to do an intermediate query. I.e. do a query that aggregates the weights and then use that query as the basis for your cross-tab.

Or if I am missing the point, then maybe sketch out a little more detail on what you are looking for.

- g

damian
11-20-2005, 11:29 AM
Thanks mate - that's exactly what I did. Thought that it was a little long winded and perhaps there was an alternative method out there.