Good Morning to all,
I apologize for the bother... I've never used a forum like this, so I do apologize if I'm breaking any rules....
I'm trying to simulate a union all query... I've created an inner join query, a left join query and a right join query, to then perform a union all. I put filters in the left and right joins to show me only the null values of a field that belongs to the other. Can anyone tell me why I'm getting this error?
SELECT [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].START_TIME, [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].END_TIME, [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].CHARGES, [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].EXPENSES, [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].GOC, [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MAJOR CATEGORY CHARGES], [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MAJOR CATEGORY EXPENSES], [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MINOR CATEGORY CHARGES], [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MINOR CATEGORY EXPENSES], [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].[PMF ACCOUNT], [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario].Scenario, [InnerJoin - Expenses and Charges per GOC
FROM [InnerJoin - Expenses and Charges per GOC, PMF Account, Scenario]
union all
SELECT [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].[Start Time], [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].END_TIME, [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].CHARGES, [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].EXPENSES, [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].Goc, [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MAJOR CATEGORY CHARGES], [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MAJOR CATEGORY EXPENSES], [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MINOR CATEGORY CHARGES], [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MINOR CATEGORY EXPENSES], [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].[PMF ACCOUNT], [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario].Scenario
FROM [LeftJoin - Expenses and Charges per GOC, PMF Account, Scenario]
union all
SELECT [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].START_TIME, [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].END_TIME, [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].CHARGES, [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].EXPENSES, [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].Goc, [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MAJOR CATEGORY CHARGES], [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MAJOR CATEGORY EXPENSES], [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MINOR CATEGORY CHARGES], [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].[MINOR CATEGORY EXPENSES], [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].LVL_18_ACCOUNT, [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario].Scenario
FROM [RightJoin - Expenses and Charges per GOC, PMF Account, Scenario];