Hello,
I have this query:
it runs OK in MS Access, but it gives me the error message 'Incorrect syntax near the keyword 'GROUP'' in SQL Express.
Any help, please?
I have this query:
SQL:
SELECT [TIME_T].[TIME_F_EMP_NUM] AS EMP_ID, [TIME_T].[TIME_F_DIV_NUM] AS DIVISION, [EE_T].[EE_F_SUR] AS LAST_NAME, [EE_T].[EE_F_FIRST] AS FIRST_NAME, Sum([TIME_T].[TIME_F_AMOUNT]) AS EARNED, Sum([TIME_T].[TIME_F_AMOUNT])*0.04 AS VACPAY
FROM TIME_T, EE_T
WHERE (((Left([TIME_F_PAY_PERIOD],4))=2019 And (([TIME_T].[TIME_F_DIV_NUM])=2) And (([TIME_T].[TIME_F_PAY_CODE])<499 And ([TIME_T].[TIME_F_PAY_CODE])<>303) And (([TIME_T].[TIME_F_EMP_NUM])=[EE_T].[EE_FP_EMP_NUM]))
GROUP BY [TIME_T].[TIME_F_EMP_NUM],
[TIME_T].[TIME_F_DIV_NUM],
[EE_T].[EE_F_SUR],
[EE_T].[EE_F_FIRST]
ORDER BY [EE_T].[EE_F_SUR];
it runs OK in MS Access, but it gives me the error message 'Incorrect syntax near the keyword 'GROUP'' in SQL Express.
Any help, please?