column heading won't work with this one

rocklee

Registered User.
Local time
Today, 12:48
Joined
May 14, 2009
Messages
36
Hi folks,

I have this crosstabe query :

Code:
TRANSFORM Count([Activity Attendance].[Activity ID]) AS [CountOfActivity ID]
SELECT [Activity Attendance].AttendanceDate
FROM [Activity Attendance]
GROUP BY [Activity Attendance].AttendanceDate
PIVOT [Activity Attendance].InClass;

Where InClass is a "yes/no" field. The columns it produces are -1 and 0, and I want to change this.

I tried in column heading but it gives me an error message "Type mismatching". I think it only accepts numeric values.

What can I do to change my column headings to text instead?
 
Don't know if this will work, but you could try:

PIVOT IIF([Activity Attendance].InClass,"Yes","No");
 
Thanks that did the trick. Had no idea what IFF was.
 

Users who are viewing this thread

Back
Top Bottom