Hello All,
I am sure this is simple, but for the life of me I cannot find where the Manager relationship to a User is located in the SQL database (7.1)
Does someone have a simple join statement to relate a user to the manager in their User Profile?
Hi,
Here is a simple query:
select usr.Name as 'User Name', mng.Name as 'Manager' from RM_ResourceUser usr join ResourceAssociation pr ON usr.Guid = pr.ParentResourceGuid join RM_ResourceUser mng on pr.ChildResourceGuid = mng.Guid
Thanks,
AN
The results were inconsistant.
Some results were managers, some results were "Direct Report's".
Try this one
select usr.Name as 'User Name', mng.Name as 'User Manager' from RM_ResourceUser usr join ResourceAssociation pr ON usr.Guid = pr.ParentResourceGuid join RM_ResourceUser mng on pr.ChildResourceGuid = mng.Guid where ResourceAssociationTypeGuid = '049c633f-8413-42ae-93ea-f4eb7edafc65'