SELECT A.OPRID , C.EMPLID , C.EMPL_RCD FROM PSOPRDEFN A , PS_SJT_CLASS_ALL B , PS_SJT_PERSON C , PS_SJT_OPR_CLS D WHERE C.APPT_TYPE <> '1' AND B.SCRTY_SET_CD = 'PPLJOB' AND B.SCRTY_TYPE_CD = C.SCRTY_TYPE_CD AND B.SCRTY_KEY1 = C.SCRTY_KEY1 AND B.SCRTY_KEY2 = C.SCRTY_KEY2 AND B.SCRTY_KEY3 = C.SCRTY_KEY3 AND D.OPRID = A.OPRID AND D.CLASSID = B.CLASSID AND (( B.TREE = 'Y' AND D.CLASSID = A.ROWSECCLASS AND D.SEC_RSC_FLG IN ('1','3')) OR B.TREE = 'N') AND A.OPRID IN ( SELECT E.ROLEUSER FROM PSROLEUSER E WHERE E.ROLENAME IN ('Time & Labor Administrator','Manager')) AND NOT EXISTS ( SELECT F.TL_GROUP_ID FROM PS_TL_GRP_SECURITY F WHERE F.ROWSECCLASS = A.ROWSECCLASS)
|