SELECT DISTINCT J.HRS_JOB_OPENING_ID ,OPR.OPRID ,OPR.EMPLID FROM PS_HRS_JOB_OPENING J , PSOPRDEFN OPR WHERE J.HRS_JOB_OPENING_ID IN ( SELECT JO.HRS_JOB_OPENING_ID FROM PS_HRS_SJT_JO JO WHERE (JO.EMPLID = OPR.EMPLID AND JO.EMPLID <> ' ' ) OR EXISTS ( SELECT 'X' FROM PS_SJT_CLASS_ALL CLS , PS_SJT_OPR_CLS RSC WHERE RSC.CLASSID = CLS.CLASSID AND RSC.OPRID = OPR.OPRID AND ((CLS.SCRTY_SET_CD = 'RSOPN' AND CLS.SCRTY_TYPE_CD = JO.SCRTY_TYPE_CD) OR (CLS.SCRTY_SET_CD = 'PPLJOB' AND CLS.SCRTY_TYPE_CD = '001')) AND CLS.SCRTY_KEY1 = JO.SCRTY_KEY1 AND CLS.SCRTY_KEY2 = JO.SCRTY_KEY2 AND CLS.SCRTY_KEY3 = JO.SCRTY_KEY3 AND JO.EMPLID = ' '))
|