Crosstab Problem

P

Proko

Is it possible for a crosstab query to have alias column names. I have a
crosstab query that groups by a column name called "Other". However these
'others' are not the same. One is an "Other" with a lng_SelectedId =1, the
other with lng_SelectedId = 2. If I set the column headers to lng_SelectedId
the results displayed have no meaning to the user. (Just column headers
displaying numbers) Is there a way around this. Any help would be greatly
appreciated.

Not sure if my SQL view of my query will help but here it is anyway.

TRANSFORM Count(Qry_MultiSelections.lng_SelectedID) AS CountOflng_SelectedID
SELECT Qry_MultiSelections.lng_RLTCID
FROM Qry_MultiSelections LEFT JOIN tbl_Selection ON
Qry_MultiSelections.lng_SelectionID = tbl_Selection.lng_SelectionID
GROUP BY Qry_MultiSelections.lng_RLTCID
PIVOT Qry_MultiSelections.lng_SelectionID;
 
P

Phil Smith

Easy.

PIVOT
IIF(Qry_MultiSelections.lng_SelectionID="1","OtherType1","OtherType2");

or

PIVOT "Other-"&Qry_MultiSelections.lng_SelectionID

Or something along those lines.
 

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