Christian_Boeck_57

help with a SQL query to get list of Users and the Groups they are in

Discussion created by Christian_Boeck_57 on May 8, 2017
Latest reply on May 9, 2017 by mselke
A customer needs help with a SQL query to get list of Users and the Groups they are in.

The table USGR represents the relation between user and user groups
The following select give you all users and its user groups

select a.OH_Client, a.OH_NAME, b.OH_Name 
from 
OH a, 
oh b, 
USRG
where 
a.OH_IDNR = USRG_USR_Idnr and
b.OH_Idnr = USRG_USG_Idnr
order by 3

Outcomes