I have the following query
SELECT COSTCENTRES.GROUP, Corp1.COSTCENTRE, COSTCENTRES.RESP_DESC, AbsenteeismTable.EMP_ID, AbsenteeismTable.NAME, Corp1.GRADE_DESC, Corp1.EMPLOYMENT, Sum(AbsenteeismTable.TAKEN) AS SumOfTAKEN
FROM (Corp1 INNER JOIN COSTCENTRES ON Corp1.COSTCENTRE = COSTCENTRES.COSTCENTRE) INNER JOIN AbsenteeismTable ON Corp1.EMP_ID = AbsenteeismTable.EMP_ID
WHERE (((Corp1.EMP_STATUS)="A1") AND ((AbsenteeismTable.TYPE)="A") AND ((AbsenteeismTable.FROM) Between #7/1/2021# And #6/30/2022#))
GROUP BY COSTCENTRES.GROUP, Corp1.COSTCENTRE, COSTCENTRES.RESP_DESC, AbsenteeismTable.EMP_ID, AbsenteeismTable.NAME, Corp1.GRADE_DESC, Corp1.EMPLOYMENT
HAVING (((Corp1.COSTCENTRE) Between "70000" And "89999"));
i want to add a field to the query which uses the Sum(AbsenteeismTable.TAKEN) AS SumOfTAKEN. balance = Sum(AbsenteeismTable.TAKEN) AS SumOfTAKEN + [AL_ENT_PRO]
is this possible in the same query?
SELECT COSTCENTRES.GROUP, Corp1.COSTCENTRE, COSTCENTRES.RESP_DESC, AbsenteeismTable.EMP_ID, AbsenteeismTable.NAME, Corp1.GRADE_DESC, Corp1.EMPLOYMENT, Sum(AbsenteeismTable.TAKEN) AS SumOfTAKEN
FROM (Corp1 INNER JOIN COSTCENTRES ON Corp1.COSTCENTRE = COSTCENTRES.COSTCENTRE) INNER JOIN AbsenteeismTable ON Corp1.EMP_ID = AbsenteeismTable.EMP_ID
WHERE (((Corp1.EMP_STATUS)="A1") AND ((AbsenteeismTable.TYPE)="A") AND ((AbsenteeismTable.FROM) Between #7/1/2021# And #6/30/2022#))
GROUP BY COSTCENTRES.GROUP, Corp1.COSTCENTRE, COSTCENTRES.RESP_DESC, AbsenteeismTable.EMP_ID, AbsenteeismTable.NAME, Corp1.GRADE_DESC, Corp1.EMPLOYMENT
HAVING (((Corp1.COSTCENTRE) Between "70000" And "89999"));
i want to add a field to the query which uses the Sum(AbsenteeismTable.TAKEN) AS SumOfTAKEN. balance = Sum(AbsenteeismTable.TAKEN) AS SumOfTAKEN + [AL_ENT_PRO]
is this possible in the same query?