Show Users Assigned to a Specific Role

Your rating: None Average: 5 (1 vote)

In a previous post I showed you how to know what Roles are assigned to a specific user. But here is how you find out what Users are assigned to a specific Role.

SELECT C.OPRID ,
  C.OPRDEFNDESC ,
  A.ROLENAME    ,
  A.DESCR
   FROM PSROLEDEFN A,
  PSROLEUSER B      ,
  PSOPRDEFN C
  WHERE B.ROLENAME = A.ROLENAME
AND C.OPRID        = B.ROLEUSER
AND B.ROLENAME LIKE UPPER(:1)
GROUP BY C.OPRID,
  C.OPRDEFNDESC ,
  A.ROLENAME    ,
  A.DESCR
ORDER BY C.OPRID;

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.