SELECT DISTINCT (A.BANK_CD) , L.LANGUAGE_CD , L.DESCR FROM PS_CSH_FCST_SUM A , PS_BANK_CD_TBL D , PS_BANK_BAL_DAILY E , PS_BANK_CD_LNG L WHERE A.SETID = D.SETID AND A.BANK_CD = D.BANK_CD AND L.SETID = D.SETID AND L.BANK_CD = D.BANK_CD AND A.GROUP_BY_FIELD = 'BNK' AND A.LINE_ITEM_TYPE = '1' AND A.POS_HIST_FLAG = 'N' AND A.CALC_DT IN ( SELECT MAX(B.CALC_DT) FROM PS_CSH_FCST_SUM B WHERE B.SETID = A.SETID AND B.WORKSHEET_ID = A.WORKSHEET_ID AND B.SOURCE_SET = A.SOURCE_SET AND B.WRKSHEET_LINE_ITEM = A.WRKSHEET_LINE_ITEM AND B.LINE_NBR = A.LINE_NBR AND B.GROUP_BY_FIELD = A.GROUP_BY_FIELD AND B.VALUE_DT = A.VALUE_DT AND B.POSITION_CURRENCY = A.POSITION_CURRENCY AND B.CURRENCY_CD = A.CURRENCY_CD AND B.LINE_ITEM_TYPE = '1' AND B.POS_HIST_FLAG = 'N' ) AND D.BNK_ID_NBR = E.BNK_ID_NBR
|