I would like to create a table that behaves much like a crosstab query(MS Access) or a Pivot table (MS Excel), using SQL. I use one table with grouped columns, and pivot on the contents of one of the columns to show totals of another column. The Access version look like this:<br>
<br>
TRANSFORM Sum([ColA]) AS [The Value]<br>
SELECT [Colb], [ColC], [Cold]<br>
FROM TableA<br>
GROUP BY [Colb], [ColC], [Cold]<br>
PIVOT [Cole];
<br>
TRANSFORM Sum([ColA]) AS [The Value]<br>
SELECT [Colb], [ColC], [Cold]<br>
FROM TableA<br>
GROUP BY [Colb], [ColC], [Cold]<br>
PIVOT [Cole];