setting two cross tab queries on top of each other

  • Thread starter Thread starter jshouse
  • Start date Start date
J

jshouse

I have to queries that I read from the same source to create the
following structure

Query 1 results:
Attribute Data Element Time 1 Time2
... Time 24
group1 Scancels 5
5 10
group2 Scancels 1
0 3

Query 2 results:
Attribute Data Element Time 1 Time2
... Time 24
group1 Ccancels 3
2 1
group2 Ccancels 1
0 3

I cannot figure out how to get a query that returns the following,
without creating a MAKE TABLE with the first result, and an APPEND
query with the second result.

Attribute Data Element Time 1 Time2
... Time 24
group1 Scancels 5
5 10
group2 Scancels 1
0 3
group1 Ccancels 3
2 1
group2 Ccancels 1
0 3

I would like to create a query that returns these results.
 
Sorry, my first time posting. After reading other's it became apparent
that I might be more helpful my providing the sequel to the first two
queries.

Query 1:

TRANSFORM Sum([Create Operations Input Template].[Cust Cancel %]) AS
[SumOfCust Cancel %]
SELECT [Create Operations Input Template].MktPgr, [Create Operations
Input Template].[MktPgr Desc], "CustCancels" AS [Data Element]
FROM [DP Time Codes] INNER JOIN [Create Operations Input Template] ON
[DP Time Codes].MonthYear = [Create Operations Input
Template].MonthYear
GROUP BY [Create Operations Input Template].MktPgr, [Create Operations
Input Template].[MktPgr Desc], "CustCancels"
ORDER BY [DP Time Codes].[DW YrMonth]
PIVOT [DP Time Codes].[DW YrMonth];

Query 2:

TRANSFORM Sum([Create Operations Input Template].[Ship Cancel %]) AS
[SumOfShip Cancel %]
SELECT [Create Operations Input Template].MktPgr, [Create Operations
Input Template].[MktPgr Desc], "ShipCancels" AS [Data Element]
FROM [DP Time Codes] INNER JOIN [Create Operations Input Template] ON
[DP Time Codes].MonthYear=[Create Operations Input Template].MonthYear
GROUP BY [Create Operations Input Template].MktPgr, [Create Operations
Input Template].[MktPgr Desc], "ShipCancels"
ORDER BY [DP Time Codes].[DW YrMonth]
PIVOT [DP Time Codes].[DW YrMonth];

I want to stack the results of these two on top of each other keeping
only 1 column for two different values of data element using the same
24 time buckets.
 
Back
Top