Monday, 20 May 2019

Oracle Cloud + Query to Find List of Users for The Specific Role

SELECT pu.username,
                 papf.person_number,
                 r.code,
                 r.role_type_code,
                 rtl.role_name,
                 rtl.description
FROM  ase_user_b u,
              per_users pu,
              per_all_people_f papf,
              ase_user_role_mbr ur,
              ase_role_b r,
              ase_role_tl rtl
WHERE 1=1
AND u.user_guid = pu.user_guid AND
NVL(u.effective_start_date,sysdate) <= sysdate AND
NVL(u.effective_end_date,sysdate) >= sysdate AND
NVL(pu.active_flag,'Y') = 'Y' AND
nvl(pu.suspended,'N') = 'N' AND
pu.person_id=papf.person_id AND
nvl(papf.effective_start_date,sysdate) <= sysdate and
nvl(papf.effective_end_date,sysdate) >= sysdate and
r.role_id = rtl.role_id AND
r.role_id = ur.role_id AND
u.user_id = ur.user_id AND
rtl.language = 'US' and
nvl(r.effective_start_date,sysdate) <= sysdate and
nvl(r.effective_end_date,sysdate) >= sysdate and
nvl(ur.effective_start_date,sysdate) <= sysdate and
nvl(ur.effective_end_date,sysdate) >= sysdate and
rtl.role_name = 'ARRIS Employee'

Your's
Amar Alam

0 comments:

Post a Comment