Query for Users and their Security Groups

Hi, 

I just want to ask for an SQL query for the security group each users belong?

Thanks and regards,

Bryan

Parents
  • Verified Answer

    +1  

    SELECT u.username USERNAME, u.full_name FULL_NAME, u.email_address EMAIL, u.end_date END_DATE, sg.security_group_name SECURITY_GROUP
    from knta_security_groups_nls sg, knta_user_security us, knta_users u
     where u.user_id = us.user_id and sg.security_group_id = us.security_group_id
     order by u.last_name, u.first_name

    Note that this will also include disabled Security Groups.

Reply
  • Verified Answer

    +1  

    SELECT u.username USERNAME, u.full_name FULL_NAME, u.email_address EMAIL, u.end_date END_DATE, sg.security_group_name SECURITY_GROUP
    from knta_security_groups_nls sg, knta_user_security us, knta_users u
     where u.user_id = us.user_id and sg.security_group_id = us.security_group_id
     order by u.last_name, u.first_name

    Note that this will also include disabled Security Groups.

Children