SELECT A.HRCD_DT_EMP , A.HRCD_DT_MGR , C.DESCR FROM PS_HRCD_DT_APR A , PS_JOB JOB , PS_JOBCODE_TBL C WHERE JOB.EMPLID = A.HRCD_DT_MGR AND JOB.EMPL_RCD = 0 AND JOB.SETID_JOBCODE = C.SETID AND JOB.JOBCODE = C.JOBCODE 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)
|