I'd like to obtain a list of which "Primary Role" is associated with each Resource, what query can be used?
Clarity Any Release
The following query will provide the information:
SELECT
sr.full_name,
pj.prprimaryroleid,
role_ref.last_name AS primary_role_name
FROM
prj_resources pj
JOIN
srm_resources sr ON sr.id = pj.prid
LEFT JOIN
srm_resources role_ref ON pj.prprimaryroleid = role_ref.id
Within the results the first row will be the first and last name of the user. The second will contain the ID of the Primary Role, and the last column contains the name of the Primary Role
If the Resource has no Primary Role, the second two fields will be blank.