I feel as if every time I make 1-step forward & I take 2-steps backwards! I have an Employees/Payroll Query & a DailyTask Query, both having a “MNTH” Fld, A “TDATE” Fld & A “HRS” Fld among other non-related flds. I want a query that shows me the MNTH, TDATE, DailyTasksHRS & the Employee HRS. I thought to have successfully accomplished this task, but now the query isn’t working.
First, I create 2-separate queries with just the MNTH, TDATE, & HRS; one from the DailyTask Query & one from the Employee/Payroll Query & joined the 2-queries according to TDATE
SELECT [MNTH\TDATE\SumOfHRS (DT)].MNTH, [MNTH\TDATE\SumOfHRS (DT)].TDATE, [MNTH\TDATE\SumOfHRS (DT)].SumOfHRS AS [DailyTasks HRS], [MNTH\TDATE\SumOfHRS (ET)].SumOfHRS AS [Employees HRS], ([DailyTasks HRS]-[Employees HRS]) AS DIF
FROM [MNTH\TDATE\SumOfHRS (DT)] INNER JOIN [MNTH\TDATE\SumOfHRS (ET)] ON [MNTH\TDATE\SumOfHRS (DT)].TDATE = [MNTH\TDATE\SumOfHRS (ET)].TDATE
ORDER BY [MNTH\TDATE\SumOfHRS (DT)].TDATE DESC;