SELECT A.HRCD_DT_EMP , A.HRCD_DT_MGR ,D.LANGUAGE_CD , D.DESCR FROM PS_HRCD_DT_APR A , PS_JOB JOB , PS_JOBCODE_TBL C , PS_JOBCODE_LANG D WHERE JOB.EMPLID = A.HRCD_DT_EMP AND JOB.EMPL_RCD = 0 AND JOB.SETID_JOBCODE = C.SETID AND JOB.JOBCODE = C.JOBCODE AND D.JOBCODE=C.JOBCODE AND C.SETID = D.SETID AND C.EFF_STATUS = 'A' AND %EffdtCheck(JOBCODE_TBL, C, %CurrentDateIn) AND JOB.EFFDT=( SELECT MAX(EFFDT) FROM PS_JOB JOB2 WHERE JOB.EMPLID=JOB2.EMPLID AND JOB.EMPL_RCD=JOB2.EMPL_RCD AND JOB2.EFFDT<=%CurrentDateIn) AND JOB.EFFSEQ = ( SELECT MAX(EFFSEQ) FROM PS_JOB WHERE EMPLID = JOB.EMPLID AND EMPL_RCD = JOB.EMPL_RCD AND EFFDT = JOB.EFFDT)
|