Daniel_Hausdorf_6982

How to get information about Usergroups by using SQL

Discussion created by Daniel_Hausdorf_6982 on Oct 10, 2016
Running the following SQL Statement will deliver the following UserGroup information:

  • Clients the UserGroup-Objects  can be found in
  • User-Objects that are part of the UserGroup 
  • First and Last Name of the User that belongs to the User-Object
SQL-Statement:

select 
 a.oh_client as Client,
 b.oh_name as User_group_object,
 a.oh_name as User_object,
 USR_FIRSTNAME as Firstname ,
 USR_LASTNAME as Lastname
 from oh a, oh b, usrg, usr where usr_oh_idnr = a.oh_idnr 
 and a.oh_idnr = usrg_usr_idnr 
 and b.oh_idnr = usrg_usg_idnr 
 and a.oh_client = b.oh_client 
 order by 1, 2, 3, 4;

The retrieved information should look like this: 

168zvkl2hw5s.jpg

Outcomes