Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/24/2024 10:35 PM
Hi Team,
We have a case where we have to insert new entry in DB while revoking the access. We have prepared the below query and trying to save the connection but we are getting below error.
We don't have any where clause as its new entry.
Query :
{
"Roles" : ["insert into ABC (id,first_name,last_name,email,emp_active,company_code,role_type,type_of_request,employee_flag,status,created_by,created_at,updated_by,updated_at,batch_id,source) values (${user.username},'${user.firstname}','${user.lastname}','${user.email}',true,'${task.entitlement_valueKey.entitlement_value}','${task.entitlement_valueKey.entitlement_value}','DELETE',true,'NEW','Saviynt',current_timestamp,'Saviynt',current_timestamp,1,'My Access')" ]
}
Thanks,
Gaurav
10/24/2024 10:49 PM
@gaurav_wagh add a select statement with where clause as in 2 actions you are performing see what it shows.
10/24/2024 10:54 PM
Can you please share the sample query ?
Regards,
Gaurav
10/24/2024 11:01 PM
@gaurav_wagh never encountered the same use case so don't have one .. but with the insert query
Add a second statement which would be select .. they way we know normally add multiple statement to execute
10/24/2024 11:48 PM
@gaurav_wagh try below
{
"Roles" : ["insert into ABC (id,first_name,last_name,email,emp_active,company_code,role_type,type_of_request,employee_flag,status,created_by,created_at,updated_by,updated_at,batch_id,source) values (${user.id},'${user.firstname}','${user.lastname}','${user.email}',true,${task.entitlement_valueKey.id},${task.entitlement_valueKey.id},'DELETE',true,'NEW','Saviynt',current_timestamp,'Saviynt',current_timestamp,1,'My Access')" ]
}