T
TBA
I read in one post that joining crosstab queries using UNION may be a
redundant idea- but I'm afraid it was a little above my level!
If anyone can offer help here, i'd be most grateful.
I have two crosstab queries extracting different scores from patients across
time. As there are more than one type of score I am assuming I need a query
for each. I would like to combine these so that i can export as an excel file.
using UNION (removing semicolon from first query) didn't work.
Here are the two queries:
queryQOL1:
TRANSFORM First([Quality of Life].[Visual Analogue Scale]) AS [FirstOfVisual
Analogue Scale]
SELECT [Quality of Life].NHI
FROM Patient INNER JOIN [Quality of Life] ON Patient.NHI=[Quality of Life].NHI
GROUP BY [Quality of Life].NHI
PIVOT [Quality of Life].[Review Type];
queryQOL2:
TRANSFORM First([Quality of Life].[EQ5D - VAS]) AS [FirstOfEQ5D - VAS]
SELECT [Quality of Life].NHI
FROM Patient INNER JOIN [Quality of Life] ON Patient.NHI = [Quality of
Life].NHI
GROUP BY [Quality of Life].NHI
ORDER BY [Quality of Life].[Review Type] DESC
PIVOT [Quality of Life].[Review Type];
redundant idea- but I'm afraid it was a little above my level!
If anyone can offer help here, i'd be most grateful.
I have two crosstab queries extracting different scores from patients across
time. As there are more than one type of score I am assuming I need a query
for each. I would like to combine these so that i can export as an excel file.
using UNION (removing semicolon from first query) didn't work.
Here are the two queries:
queryQOL1:
TRANSFORM First([Quality of Life].[Visual Analogue Scale]) AS [FirstOfVisual
Analogue Scale]
SELECT [Quality of Life].NHI
FROM Patient INNER JOIN [Quality of Life] ON Patient.NHI=[Quality of Life].NHI
GROUP BY [Quality of Life].NHI
PIVOT [Quality of Life].[Review Type];
queryQOL2:
TRANSFORM First([Quality of Life].[EQ5D - VAS]) AS [FirstOfEQ5D - VAS]
SELECT [Quality of Life].NHI
FROM Patient INNER JOIN [Quality of Life] ON Patient.NHI = [Quality of
Life].NHI
GROUP BY [Quality of Life].NHI
ORDER BY [Quality of Life].[Review Type] DESC
PIVOT [Quality of Life].[Review Type];