View Full Version : column heading won't work with this one


rocklee
05-22-2009, 10:23 AM
Hi folks,

I have this crosstabe query :


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?

HiTechCoach
05-22-2009, 10:51 AM
Don't know if this will work, but you could try:

PIVOT IIF([Activity Attendance].InClass,"Yes","No");

rocklee
05-23-2009, 08:49 AM
Thanks that did the trick. Had no idea what IFF was.

HiTechCoach
05-26-2009, 10:38 AM
You're welcome!

Glad that it worked for you. :)