I've got this query. It works perfectly fine but as soon as I try to make some changes on the query on my access db it would not let me save. I want to change qry_01_xx_BacklogUnion_New to qry_01_xx_BacklogUnion_New1, both tables have same structure.
It's coming back with 'Syntax error in From Clause'. Please help.
SELECT qry_Reference_WGS_Structure.TERRITORY, qry_Reference_WGS_Structure.IMM, qry_Reference_WGS_Structure.MDUM_DESC AS MDUM, qry_Reference_WGS_Structure.ENGINEER_DESC AS ENGINEER, DISTRIBUTION.DAYS_OVERDUE, DISTRIBUTION.WORK_ORDERS
FROM qry_Reference_WGS_Structure LEFT JOIN [SELECT qry_01_xx_BacklogUnion_New.[Work Group] AS WORK_GROUP, tbl_Distribution_Days.[Distribution of Days Overdue] AS DAYS_OVERDUE, Count(qry_01_xx_BacklogUnion_New.[Work Order No]) AS [WORK_ORDERS]
FROM qry_01_xx_BacklogUnion_New LEFT JOIN tbl_Distribution_Days ON qry_01_xx_BacklogUnion_New.[Days Overdue] = tbl_Distribution_Days.Value
GROUP BY qry_01_xx_BacklogUnion_New.[Work Group], tbl_Distribution_Days.[Distribution of Days Overdue]
]. AS DISTRIBUTION ON qry_Reference_WGS_Structure.WORK_GROUP = DISTRIBUTION.WORK_GROUP;
It's coming back with 'Syntax error in From Clause'. Please help.
SELECT qry_Reference_WGS_Structure.TERRITORY, qry_Reference_WGS_Structure.IMM, qry_Reference_WGS_Structure.MDUM_DESC AS MDUM, qry_Reference_WGS_Structure.ENGINEER_DESC AS ENGINEER, DISTRIBUTION.DAYS_OVERDUE, DISTRIBUTION.WORK_ORDERS
FROM qry_Reference_WGS_Structure LEFT JOIN [SELECT qry_01_xx_BacklogUnion_New.[Work Group] AS WORK_GROUP, tbl_Distribution_Days.[Distribution of Days Overdue] AS DAYS_OVERDUE, Count(qry_01_xx_BacklogUnion_New.[Work Order No]) AS [WORK_ORDERS]
FROM qry_01_xx_BacklogUnion_New LEFT JOIN tbl_Distribution_Days ON qry_01_xx_BacklogUnion_New.[Days Overdue] = tbl_Distribution_Days.Value
GROUP BY qry_01_xx_BacklogUnion_New.[Work Group], tbl_Distribution_Days.[Distribution of Days Overdue]
]. AS DISTRIBUTION ON qry_Reference_WGS_Structure.WORK_GROUP = DISTRIBUTION.WORK_GROUP;