SELECT JO.HRS_JOB_OPENING_ID , 'E:' %Concat JO.EMPLID FROM PS_HRS_SJT_JO JO WHERE JO.EMPLID <> ' ' UNION SELECT JO.HRS_JOB_OPENING_ID , 'C:' %Concat CLS.CLASSID FROM PS_HRS_SJT_JO JO , PS_SJT_CLASS_ALL CLS WHERE CLS.SCRTY_SET_CD = 'RSOPN' AND CLS.SCRTY_TYPE_CD = JO.SCRTY_TYPE_CD AND CLS.SCRTY_KEY1 = JO.SCRTY_KEY1 AND CLS.SCRTY_KEY2 = JO.SCRTY_KEY2 AND CLS.SCRTY_KEY3 = JO.SCRTY_KEY3 AND JO.EMPLID = ' ' UNION SELECT JO.HRS_JOB_OPENING_ID , 'C:' %Concat CLS.CLASSID FROM PS_HRS_SJT_JO JO , PS_SJT_CLASS_ALL CLS WHERE 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 = ' ' UNION SELECT 0 , 'A:ALL' FROM PS_HRS_RCMNT
|