SELECT A.BO_ID , D.LANGUAGE_CD , D.XLATLONGNAME , D.XLATSHORTNAME FROM PS_BO_ROLE_VW3 A , PSXLATITEM B , PSXLATITEMLANG D WHERE B.FIELDNAME = 'WORKER_SUBROLE_SUM' AND B.EFF_STATUS = 'A' AND B.EFFDT = ( SELECT MAX(C.EFFDT) FROM PSXLATITEM C WHERE C.FIELDNAME = B.FIELDNAME AND C.FIELDVALUE = B.FIELDVALUE AND C.EFFDT <= %CurrentDateIn) AND D.FIELDNAME = B.FIELDNAME AND D.FIELDVALUE = B.FIELDVALUE AND D.EFFDT = B.EFFDT GROUP BY A.BO_ID, D.LANGUAGE_CD, D.XLATLONGNAME, D.XLATSHORTNAME, B.FIELDVALUE HAVING B.FIELDVALUE = %NumToChar(SUM(A.ROLE_TYPE_ID3))
|