We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Transform of Custom Query into EnhancedExecution Query

AravindK
Regular Contributor
Regular Contributor

Hi Team,

We have a custom query which we are using for to update the manager details for the users and we need to modify the query but custom query job is not editable . 

We need to create EnhancedExecution Query but we are not able to form the below custom  query as per the EnhancedExecutionQuery.

UPDATE users AS u1
JOIN users AS u2 ON u2.username = SUBSTRING_INDEX(u1.owner, ':', 1)
SET u1.owner = SUBSTRING_INDEX(u1.owner, ':', 1),
u1.manager = u2.userkey
WHERE u1.createdate >= DATE_SUB(NOW(), INTERVAL 1 HOUR);

Can someone help to translate the above query as per the enhancedquery ?

Thanks,
Aravind



2 REPLIES 2

rushikeshvartak
All-Star
All-Star

Enhanced query on users table is not supported.

https://docs.saviyntcloud.com/bundle/EIC-Admin-v23x/page/Content/Chapter10-Job-Control-Panel/Job-Cat...

rushikeshvartak_0-1706853394630.png

 


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

CR
Regular Contributor III
Regular Contributor III

@AravindK 

We can't update 23v users table its restricted , if have scenario creation of user or update , you can update via S4S connection ex:

"UPDATE users AS u1 JOIN users AS u2 ON u2.username = SUBSTRING_INDEX(u1.owner, ':', 1) SET u1.owner = SUBSTRING_INDEX(u1.owner, ':', 1), u1.manager = u2.userkey WHERE u1.userkey='${user.id}'",

Based on scenario you can customize above query , user update rule through you can trigger connection create/update.

Thanks,
Raghu
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.