crosstab queries

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;
 
J

John Spencer

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
 

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