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

CustomQuery to update with users Manager's Manager

RV
Regular Contributor
Regular Contributor

Can someone please share a query to update a CustomPropertyX on the user profile with their Manager's Manager.

4 REPLIES 4

rushikeshvartak
All-Star
All-Star


update users u ,users m,users mm set u.customproperty1=mm.username where u.manager=m.userkey and m.manager=mm.userkey limit 10;


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

rushikeshvartak
All-Star
All-Star

update users u left join users m on u.manager=m.userkey left join users mm on m.manager=mm.userkey on u.customproperty1=mm.username limit 1;


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

RV
Regular Contributor
Regular Contributor

I see you have replied two query,  Is the query to try out as it is setting customproperty1 ?

 

update users u ,users m,users mm set u.customproperty1=mm.username where u.manager=m.userkey and m.manager=mm.userkey limit 10;

Both will work . 


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