SELECT DISTINCT RTOVW.EMPLID , SEGVW.EMPL_RCD , CONT.CONTRACT_NUM , ACT.LANGUAGE_CD ,ACT.ACTION_DESCR ,RES.DESCR FROM PS_GP_RTO_TRGR_VW RTOVW , PS_GP_SEG_TRGR_VW SEGVW , PS_JOB JOB ,PS_CNT_ACTIVE_VW CONT , PS_NAMES NAM , PS_ACTION_LNG ACT ,PS_ACTN_RSN_LANG RES ,PS_GP_PYE_SEG_STAT PYESTAT WHERE RTOVW.TRGR_EVENT_ID IN ( SELECT TRGR_EVENT_ID FROM PS_GPFR_TERM_TRG WHERE TRGR_TYPE='R') AND RTOVW.EMPLID=JOB.EMPLID AND CONT.EMPLID=RTOVW.EMPLID AND CONT.CONTRACT_END_DT = %DateAdd(RTOVW.TRGR_EFFDT,-1) AND RTOVW.EMPLID=NAM.EMPLID AND RTOVW.EMPLID=PYESTAT.EMPLID AND PYESTAT.PYE_CALC_STAT = '70' AND JOB.EFFDT=RTOVW.TRGR_EFFDT AND JOB.ACTION=ACT.ACTION AND JOB.ACTION_REASON=RES.ACTION_REASON AND SEGVW.EMPLID=RTOVW.EMPLID AND SEGVW.TRGR_EFFDT=RTOVW.TRGR_EFFDT AND SEGVW.COUNTRY=RTOVW.COUNTRY AND SEGVW.TRGR_EVENT_ID=RTOVW.TRGR_EVENT_ID AND SEGVW.TRGR_CREATE_TS=RTOVW.TRGR_CREATE_TS
|