I have two tables, PositionDetail, and BudgetNew. Each has a field called Job Code, and each has a field identifying a department, called [Rpt Dept] in PositionDetail, and [Department] in BudgetNew. I want to create a query to find, for each [Rpt Dept] in PositionNew, those records in PositionDetail containing a [Job Code] that does not appear in BudgetNew for the identical [Department]. I thought this would be simple, and I created a query like the following:
SELECT PositionDetail.[Rpt Dept], PositionDetail.[Job Code], BudgetNew.Department
FROM PositionDetail LEFT JOIN BudgetNew ON PositionDetail.[Job Code] = BudgetNew.[Job Code]
WHERE (((BudgetNew.[Job Code]) Is Null));
However when I want the inner join on departments:
BudgetNew INNER JOIN PositionDetail ON BudgetNew.Department = PositionDetail.[Rpt Dept]
and add this to the query I get the ambiguous outer join error message. Is the solution to this some kind of intermediate query? I have tried and not succeeded so far!
T.Y.
SELECT PositionDetail.[Rpt Dept], PositionDetail.[Job Code], BudgetNew.Department
FROM PositionDetail LEFT JOIN BudgetNew ON PositionDetail.[Job Code] = BudgetNew.[Job Code]
WHERE (((BudgetNew.[Job Code]) Is Null));
However when I want the inner join on departments:
BudgetNew INNER JOIN PositionDetail ON BudgetNew.Department = PositionDetail.[Rpt Dept]
and add this to the query I get the ambiguous outer join error message. Is the solution to this some kind of intermediate query? I have tried and not succeeded so far!
T.Y.