Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

query to see if user is a manager

Vinit556
New Contributor III
New Contributor III

Hello,

Our HR doesn't send any flag if user is a manger or not.

Hence, i am looking for a query which can check if imported user is a manager or not. If he/she is a manager, using SAv2Sav I will map the output with custom attribute in user data as yes or no.

Example:

user is imported via HR source. Now, via user update xml, Sav2Sav will check if imported user is a manager or not and output will be mapped to CP40 of the user attribute.

 

1 REPLY 1

rushikeshvartak
All-Star
All-Star

select u.username, case when (select distinct m.username from users m where m.manager=u.userkey limit 1 ) is not null then 'Yes' else 'No' end as Ismanager from users u
limit 10


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.