Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/29/2024 04:30 AM
Hi Team,
I am trying to change the role status from Inactive to active via custom query job, however it is throwing error.
Below is the Query :
update roles set statuskey=1 where ROLEKEY=101;
Error:
can you please advise on the issue here.
Thank you,
Ekata
08/29/2024 04:45 AM
Hi @Ekata_bharati use the query like below as I am assuming you are using enhance query
SELECT 1 AS statuskey FROM roles WHERE ROLEKEY=101;
Regards,
Indra
08/29/2024 05:09 AM - edited 08/29/2024 05:10 AM
@Ekata_bharati Try below
SELECT 1 AS ROLES__STATUS,ROLEKEY AS ROLES__PRIMARYKEY FROM ROLES R WHERE R.ROLE_NAME LIKE '%ABC%'
SELECT 1 AS ROLES__STATUS,ROLEKEY AS ROLES__PRIMARYKEY FROM ROLES R WHERE R.ROLEKEY=101
08/29/2024 05:13 AM - edited 08/29/2024 05:48 AM
Hi @Ekata_bharati , Please follow this doc as custom queries are now called enhanced queries and format has changed significantly. - https://docs.saviyntcloud.com/bundle/EIC-Admin-v23x/page/Content/Chapter10-Job-Control-Panel/Job-Cat...
SELECT rolekey as ROLES_PRIMARYKEY, 1 as ROLES __status from ROLES where rolekey=101;
08/29/2024 05:40 AM
SELECT
rolekey AS roles__primarykey,
0 AS roles__status
FROM
roles r
WHERE
r.rolekey = 101
LIMIT 1;
Refer