SELECT DISTINCT A.EMPLID ,B.DESCR ,A.COMPANY ,B.DESCR_AC ,B.DESCRSHORT FROM PS_JOB A , PS_COMPANY_TBL B WHERE A.COMPANY = B.COMPANY AND B.EFFDT = ( SELECT MAX(B1.EFFDT) FROM PS_COMPANY_TBL B1 WHERE B1.COMPANY = B.COMPANY AND B1.EFF_STATUS = 'A') AND B.COUNTRY='USA' AND A.EFFDT = ( SELECT MAX(J1.EFFDT) FROM PS_JOB J1 WHERE J1.EMPLID = A.EMPLID AND J1.EMPL_RCD = A.EMPL_RCD AND J1.EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(J2.EFFSEQ) FROM PS_JOB J2 WHERE J2.EMPLID = A.EMPLID AND J2.EMPL_RCD = A.EMPL_RCD AND J2.EFFDT = A.EFFDT) AND B.TAX_REPORT_TYPE<>'R'
|