SELECT A.SETID_DEPT ,A.DEPTID ,O.OPRCLASS ,%Truncate(SUM(%Sql(FUNCLIB_HR_CURRENC_RESULT,A.ANNUAL_RT,CONV)),2) ,COUNT(*) ,SUM(A.FTE) FROM PS_JOB A ,PS_OPR_DEF_TBL_HR O %Sql(FUNCLIB_HR_CURRENC_FROM) CONV WHERE A.PER_ORG = 'EMP' AND A.EFFDT = ( SELECT MAX(C.EFFDT) FROM PS_JOB C WHERE C.EMPLID = A.EMPLID AND C.EMPL_RCD = A.EMPL_RCD AND C.EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(D.EFFSEQ) FROM PS_JOB D WHERE D.EMPLID = A.EMPLID AND D.EMPL_RCD = A.EMPL_RCD AND D.EFFDT = A.EFFDT) AND A.HR_STATUS = 'A' AND A.POSITION_NBR <> ' ' AND %Sql(FUNCLIB_HR_CURRENC_WHERE,A.CURRENCY_CD,O.EXCHNG_TO_CURRENCY,O.EXCHNG_TO_RT_TYPE,%CurrentDateIn,CONV) AND O.OPRCLASS = %OperatorClass GROUP BY A.SETID_DEPT, A.DEPTID, O.OPRCLASS
|