Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

facing issue on stored procedure query

karthikkale
New Contributor
New Contributor

Hi team,
i am trying to update user information inside the database. Using stored procedure, but saviynt is providing error while clearing the pending task. Can you please help here.

pending task error:-SAV - Error while updating user - Incorrect syntax near ')'.

updateuser query:-{"UpdateUserQry":["EXEC storeprocdure @employee_number = '${user.username}', @closed_by_username = 'IGA', @reason = CASE WHEN '${user.customproperty63}' = 'Close Worker Profile' THEN 'hire' WHEN '${user.customproperty45}' = 'DOES NOT WORK FOR ME' THEN 'rehire' WHEN '${user.customproperty42}' = '3' THEN 'terminated' WHEN '${user.customproperty45}' = 'No response' THEN 'terminated' ELSE NULL END, @actual_end_date = '${user.enddate}', @comments = CASE WHEN '${user.employeeType}' = 'Contractor' THEN 'C' ELSE 'thirdparty' END, @reported = 'No', @timestamp = GETDATE();"]}

Regards,

Karthik Kale U

1 REPLY 1

Vedanth-BK
Regular Contributor II
Regular Contributor II

Hello @karthikkale 
Please try with the below JSON .If it does not work, share a screenshot of a successful implemented query 

{
  "UpdateUserQry": "EXEC storeprocdure @employee_number = '${user.username}', @closed_by_username = 'IGA', @reason = CASE WHEN '${user.customproperty63}' = 'Close Worker Profile' THEN 'hire' WHEN '${user.customproperty45}' = 'DOES NOT WORK FOR ME' THEN 'rehire' WHEN '${user.customproperty42}' = '3' THEN 'terminated' WHEN '${user.customproperty45}' = 'No response' THEN 'terminated' ELSE NULL END, @actual_end_date = '${user.enddate}', @comments = CASE WHEN '${user.employeeType}' = 'Contractor' THEN 'C' ELSE 'thirdparty' END, @reported = 'No', @timestamp = GETDATE();"
}
Thank you
Vedanth B.K
If you find my response helpful and it works, Hit the 'Kudos' button and accept it as a solution!!