crosstab queries

  • Thread starter Thread starter subs
  • Start date Start date
S

subs

I am trying to join the following cross tab queries below- What will
be the SQL statement be?

TRANSFORM Avg([current year].SumOfPAID_AMT) AS AvgOfSumOfPAID_AMT
SELECT [current year].OCITY
FROM [current year]
GROUP BY [current year].OCITY
PIVOT theYear;



TRANSFORM Avg([current year].SumOfTRANSPORT_AMT) AS
AvgOfSumOfTRANSPORT_AMT
SELECT [current year].OCITY
FROM [current year]
GROUP BY [current year].OCITY
PIVOT theYear;
 
SELECT *
FROM Crosstab1 INNER JOIN CrossTab2
ON Crosstab1.OCity = Crosstab2.OCity

In Query Design view
Create a new query
Add both crosstab queries
Draw a line from City to City to join the queries together.
Select the fields you want displayed

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top