Combining Crosstab Queries

  • Thread starter dp724 via AccessMonster.com
  • Start date
D

dp724 via AccessMonster.com

I have 2 crosstab queries, each displays the same calendar period in the
column heading row and the same project number as row heading, but the value
data row is different. How can the 2 queries be combined to display as 1
crosstab query? In the end, I need to see 2 value data rows, along with the
column heading row and row heading(s). I've tried creating a UNION query with
the 2 SQL's, see below, but I get a missing operator error.

TRANSFORM Sum(QryDiscChart1.FTEperMo) AS SumOfFTEperMo
SELECT QryDiscChart1.PSE
FROM QryDiscChart1
GROUP BY QryDiscChart1.PSE
PIVOT Format([ConstMon],"yyyy-mm")
UNION
TRANSFORM Sum(QryDiscChart1.ResidentEng) AS SumOfResidentEng
SELECT QryDiscChart1.PSE
FROM QryDiscChart1
GROUP BY QryDiscChart1.PSE
PIVOT Format([ConstMon],"yyyy-mm");

Thanks in advance.
Dave
 
D

dp724 via AccessMonster.com

Created a query using the crosstab query names, as follows:

Select QryDiscChart1.*
From QryDiscChart1
UNION
Select QryDiscChart2.*
From QryDiscChart2;


I have 2 crosstab queries, each displays the same calendar period in the
column heading row and the same project number as row heading, but the value
data row is different. How can the 2 queries be combined to display as 1
crosstab query? In the end, I need to see 2 value data rows, along with the
column heading row and row heading(s). I've tried creating a UNION query with
the 2 SQL's, see below, but I get a missing operator error.

TRANSFORM Sum(QryDiscChart1.FTEperMo) AS SumOfFTEperMo
SELECT QryDiscChart1.PSE
FROM QryDiscChart1
GROUP BY QryDiscChart1.PSE
PIVOT Format([ConstMon],"yyyy-mm")
UNION
TRANSFORM Sum(QryDiscChart1.ResidentEng) AS SumOfResidentEng
SELECT QryDiscChart1.PSE
FROM QryDiscChart1
GROUP BY QryDiscChart1.PSE
PIVOT Format([ConstMon],"yyyy-mm");

Thanks in advance.
Dave
 

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