I have, what I think, is a basic union query:
However, it is saying it is too complex...whatever that means. If I remove the last UNION section and stop at FY09-Q2 it works fine. I'm not sure why adding next section would make it too complex.
In the end I want to add the same structure for FY10 and FY11 in the same query.
Ideas?
Code:
SELECT [Breakdown Union xFY].ENDUSER_CUST_NUM, Sum([Breakdown Union xFY].[FY 2009 Covered]) AS [Product Value Sum], "FY09" AS [FY Covered]
FROM [Breakdown Union xFY]
GROUP BY [Breakdown Union xFY].ENDUSER_CUST_NUM, "FY09"
UNION
SELECT [Breakdown Union xFY].ENDUSER_CUST_NUM, Sum([Breakdown Union xFY].[FY09-Q1 Covered]) AS [Product Value Sum], "FY09-Q1" AS [FY Covered]
FROM [Breakdown Union xFY]
GROUP BY [Breakdown Union xFY].ENDUSER_CUST_NUM, "FY09-Q1"
UNION
SELECT [Breakdown Union xFY].ENDUSER_CUST_NUM, Sum([Breakdown Union xFY].[FY09-Q2 Covered]) AS [Product Value Sum], "FY09-Q2" AS [FY Covered]
FROM [Breakdown Union xFY]
GROUP BY [Breakdown Union xFY].ENDUSER_CUST_NUM, "FY09-Q2"
UNION
SELECT [Breakdown Union xFY].ENDUSER_CUST_NUM, Sum([Breakdown Union xFY].[FY09-Q3 Covered]) AS [Product Value Sum], "FY09-Q3" AS [FY Covered]
FROM [Breakdown Union xFY]
GROUP BY [Breakdown Union xFY].ENDUSER_CUST_NUM, "FY09-Q3";
However, it is saying it is too complex...whatever that means. If I remove the last UNION section and stop at FY09-Q2 it works fine. I'm not sure why adding next section would make it too complex.
In the end I want to add the same structure for FY10 and FY11 in the same query.
Ideas?