Find users related to a group

Contribute from: Tim Hartman (TX3)

ALM uses a bitmask stored in the US_GROUP field (within each project) to determine what roles have been assigned to users. The position of each 1 within this field determines what roles have been assigned based on GR_GROUP_ID. Note that if you add and remove groups, the bitmask length will grow, but never shrink.

 

DB TYPE:           ORACLE 11g

Query:

select us_username "User ID"

from users

where substr(us_group,to_number((select gr_group_id from groups where gr_group_name='TDAdmin'))+1,1)='1'