J
Jesper
Hi all,
I have this crosstab query that is working.
TRANSFORM First(tblAnswers.Answer) AS FirstOfAnswer
SELECT tblAnswers.clientID
FROM tblDataTemp LEFT JOIN tblAnswersON (tblDataTemp.TestNoID =
tblAnswers.TestNoID ) AND (tblDataTemp.SpmID= tblAnswers.SpmID)
GROUP BY tblAnswers.clientID
ORDER BY tblAnswers.clientID, tblDataTemp.varname
PIVOT tblDataTemp.varname;
I have 2 questions:
The columns in the output are sorted alphabetically by "varname".
I'd like to sort them according to another field "ID" which is in
tblDataTemp instead.
Is that possible?
Also - the ouput naturally outputs the data, but is it possible to include
the actual fieldnames (i.e. varname field) in the output.
So that it appears in the output and not just as column names? Perhaps with
some union query? (I'm using this for data export where this would be
useful).
Thanks a lot.
Jesper, Denmark
I have this crosstab query that is working.
TRANSFORM First(tblAnswers.Answer) AS FirstOfAnswer
SELECT tblAnswers.clientID
FROM tblDataTemp LEFT JOIN tblAnswersON (tblDataTemp.TestNoID =
tblAnswers.TestNoID ) AND (tblDataTemp.SpmID= tblAnswers.SpmID)
GROUP BY tblAnswers.clientID
ORDER BY tblAnswers.clientID, tblDataTemp.varname
PIVOT tblDataTemp.varname;
I have 2 questions:
The columns in the output are sorted alphabetically by "varname".
I'd like to sort them according to another field "ID" which is in
tblDataTemp instead.
Is that possible?
Also - the ouput naturally outputs the data, but is it possible to include
the actual fieldnames (i.e. varname field) in the output.
So that it appears in the output and not just as column names? Perhaps with
some union query? (I'm using this for data export where this would be
useful).
Thanks a lot.
Jesper, Denmark