Hi I have a number of pivot table queries which I wish to combine so I can develop one pivot table for multiple table results. Here is an example of one pivot query-note each query works
TRANSFORM Nz(Count(fsqlmonth([DateNotified])),0) AS [The Value]
SELECT TBL_Inquiries.refyear
FROM TBL_Inquiries
Where TBL_Inquiries.refyear=2009
GROUP BY TBL_Inquiries.RefYear
PIVOT fsqlmonth(TBL_Inquiries.DateNotified) In (1,2,3,4,5,6,7,8,9,10,11,12);
Now I have 6 of these to interogate individual tables. They are all the same to give me figures for each month for the year.
What I want to do is construct just one table with these queries combined for a year.
Example:
Incidents Jan Feb Mar .... -> dec (where data is used in each month)
Complaints Jan Feb Mar .... -> dec (where data is used in each month)
Next series
next series
and so on for the six tables.
I want to use this table in a charting process. I am lousy at pivot tables tec so any assistance or examples would be helpful.
Tony
Also the fsqlmonth is:
Public Function fSQLMonth(varDate)
If Not IsNull(varDate) Then fSQLMonth = DatePart("m", varDate)
End Function
TRANSFORM Nz(Count(fsqlmonth([DateNotified])),0) AS [The Value]
SELECT TBL_Inquiries.refyear
FROM TBL_Inquiries
Where TBL_Inquiries.refyear=2009
GROUP BY TBL_Inquiries.RefYear
PIVOT fsqlmonth(TBL_Inquiries.DateNotified) In (1,2,3,4,5,6,7,8,9,10,11,12);
Now I have 6 of these to interogate individual tables. They are all the same to give me figures for each month for the year.
What I want to do is construct just one table with these queries combined for a year.
Example:
Incidents Jan Feb Mar .... -> dec (where data is used in each month)
Complaints Jan Feb Mar .... -> dec (where data is used in each month)
Next series
next series
and so on for the six tables.
I want to use this table in a charting process. I am lousy at pivot tables tec so any assistance or examples would be helpful.
Tony
Also the fsqlmonth is:
Public Function fSQLMonth(varDate)
If Not IsNull(varDate) Then fSQLMonth = DatePart("m", varDate)
End Function