SELECT APPR.EP_APPRAISAL_ID , RATE.LANGUAGE_CD , RATE.DESCR FROM PS_EP_APPR APPR , PS_REVW_RATING_LNG RATE , PS_EP_DEFAULT EPDFLT WHERE APPR.EP_REVIEW_STATUS = 'CO' AND APPR.EP_REVIEW_TYPE = EPDFLT.EP_REVIEW_TYPE AND EPDFLT.EP_TRANSACTION_NM = 'M' AND APPR.PERIOD_END_DT =( SELECT MAX(A1.PERIOD_END_DT) FROM PS_EP_APPR A1 WHERE APPR.EMPLID = A1.EMPLID AND APPR.EMPL_RCD = A1.EMPL_RCD AND APPR.EP_REVIEW_STATUS = A1.EP_REVIEW_STATUS AND APPR.EP_REVIEW_TYPE = A1.EP_REVIEW_TYPE ) AND RATE.RATING_MODEL = APPR.RATING_MODEL AND RATE.REVIEW_RATING = APPR.REVIEW_RATING AND RATE.EFFDT = ( SELECT MAX(D.EFFDT) FROM PS_REVW_RATING_LNG D WHERE D.RATING_MODEL = RATE.RATING_MODEL AND D.REVIEW_RATING = RATE.REVIEW_RATING AND D.EFFDT <= %CurrentDateIn)
|