sum field name is single character

  • Thread starter Thread starter inungh
  • Start date Start date
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,
 
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
 
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,
 
Back
Top