sum field name is single character

I

inungh

I have data as following

Student ID, Exam date, Grade,
1 4/30/2009 A
2 4/30/2009 B
1 05/03/2009 C


and have a crosstab query Grad as Column heading.
The column heading will be A, B, C, D.

The problam is when I sum the field name as "A", "B", "C", "D" that MS
Access does not recognize the field name for one character.

I need use like GradA, GradB...etc,

Are there any solution on the crosstab query to return field name more
than one charatcer even the data is one charater only.


Your help is great appreciated,
 
M

Michel Walsh

Edit your query in SQL, spot the PIVOT clause:

PIVOT someField


and change it to


PIVOT "Grad" & someField




Note that is the PIVOT clause has an IN sub-clause,



PIVOT someField IN( "A", "B", "C")


you must change that subclause too:

PIVOT "Grad" & someField IN( "gradA", "gradB", "gradC")





Vanderghast, Access MVP
 
I

inungh

Edit your query in SQL, spot the PIVOT clause:

    PIVOT  someField

and change it to

    PIVOT "Grad" &  someField

Note that is the PIVOT clause has an IN sub-clause,

    PIVOT  someField IN( "A", "B", "C")

you must change that subclause too:

    PIVOT  "Grad" & someField IN( "gradA", "gradB", "gradC")

Vanderghast, Access MVP












- Show quoted text -

Thanks millions,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top