Hi
I have written a Crosstab query in MS access. I dont really think its
ANSI compliant, which I kinda need it to be.
For those of you who are uneducated in the ways of crosstab query, it
operates much like a pivot table in Excel.
If you have rows like this
A, March
B, June
A, Jan
D, June
A, March
And you run a crosstab you can get results like
Name,Jan, March, June
A 1 2 NULL
B NULL NULL 1
D NULL NULL 1
So I can sum the results per month and print the months out in a
tabular form, for nice reporting.
Now, to do this I do a
TRANSFORM Count(Month)
SELECT Name, Count(Month)
FROM Tbl
PIVOT Month
Which pivots it on Month.
My question is, if I need to use ANSII SQL to do this very same thing
... then how do I do it ?
Any help gratefully received.
Brian
I have written a Crosstab query in MS access. I dont really think its
ANSI compliant, which I kinda need it to be.
For those of you who are uneducated in the ways of crosstab query, it
operates much like a pivot table in Excel.
If you have rows like this
A, March
B, June
A, Jan
D, June
A, March
And you run a crosstab you can get results like
Name,Jan, March, June
A 1 2 NULL
B NULL NULL 1
D NULL NULL 1
So I can sum the results per month and print the months out in a
tabular form, for nice reporting.
Now, to do this I do a
TRANSFORM Count(Month)
SELECT Name, Count(Month)
FROM Tbl
PIVOT Month
Which pivots it on Month.
My question is, if I need to use ANSII SQL to do this very same thing
... then how do I do it ?
Any help gratefully received.
Brian