Using several make table queries based on passthrough queries in MS Access Db to extract records with the latest reviewer end date.
Upon trying to run the query below within MS Access to extract records with the latest "REVIEWER_END_DT", I receive an error message related to the FROM clause.
Note, "REVIEW_MGMT" is an oracle table and "tblReport" is the local MS Access table that is a result of a make table query sourced from a passthrough query.
Have tried placing the comma in different places but haven't been successful.
Any insight as to the problem and a solution is greatly appreciated.
SELECT tblReport.LastName, tblReport.FirstName, tblReport.AcctNo, A.REVIEWER, A.REVIEWER_END_DT
FROM REVIEW_MGMT as A
INNER JOIN (Select T.PRODUCT_CD, Max(A.REVIEWER_END_DT) AS MaxReviewEndDt
From CUSTOMER as T
GROUP BY T.PRODUCT_CD AS TMP
ON T.PRODUCT_CD = TMP.PRODUCT_CD
AND A.PRODUCT_CD = T.PRODUCT_CD)
INNER JOIN tblReport
ON T.REV_NO = tblReport.AcctNo;
Upon trying to run the query below within MS Access to extract records with the latest "REVIEWER_END_DT", I receive an error message related to the FROM clause.
Note, "REVIEW_MGMT" is an oracle table and "tblReport" is the local MS Access table that is a result of a make table query sourced from a passthrough query.
Have tried placing the comma in different places but haven't been successful.
Any insight as to the problem and a solution is greatly appreciated.
SELECT tblReport.LastName, tblReport.FirstName, tblReport.AcctNo, A.REVIEWER, A.REVIEWER_END_DT
FROM REVIEW_MGMT as A
INNER JOIN (Select T.PRODUCT_CD, Max(A.REVIEWER_END_DT) AS MaxReviewEndDt
From CUSTOMER as T
GROUP BY T.PRODUCT_CD AS TMP
ON T.PRODUCT_CD = TMP.PRODUCT_CD
AND A.PRODUCT_CD = T.PRODUCT_CD)
INNER JOIN tblReport
ON T.REV_NO = tblReport.AcctNo;