cyndi.castro

Query secondary intitutional roles

Discussion created by cyndi.castro on Aug 25, 2017
Latest reply on Feb 16, 2018 by rs0068755

Hi all,

This is not a question as much as a thank you to all who have helped me with OpenDB. Here is one of my first queries any suggestions for improvement are welcomed:

 

this give a list of users that have the secondary role selected (in the example it is Role 11)

 

SELECT

    U.USER_ID,

    IR.ROLE_ID,

    IR.DESCRIPTION

FROM

    INSTITUTION_ROLES IR

    JOIN USER_ROLES UR ON IR.PK1 = UR.INSTITUTION_ROLES_PK1

    JOIN USERS U ON UR.USERS_PK1 = U.PK1

WHERE

    IR.ROLE_ID = 'ROLE_11'

ORDER BY U.USER_ID

 

Again, thank you for all your help

 

Cyndi

Outcomes