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

Role status change

Ekata_bharati
New Contributor II
New Contributor II

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:

Ekata_bharati_0-1724930977783.png

can you please advise on the issue here.

Thank you,

Ekata

 

4 REPLIES 4

indra_hema_95
Regular Contributor III
Regular Contributor III

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

SumathiSomala
All-Star
All-Star

@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

Regards,
Sumathi Somala

If this reply answered your question, please Accept As Solution and give Kudos.

Amit_Malik
Valued Contributor II
Valued Contributor II

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;

 

 

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

rushikeshvartak
All-Star
All-Star
  • Custom Query Job is deprecetad from 23.6 hence please use enhanced query job 
  • Please use below query 

 

SELECT 
    rolekey AS roles__primarykey,
    0 AS roles__status
FROM 
    roles r
WHERE 
    r.rolekey = 101
LIMIT 1;

 

  • Role Status Values 
    • 0: INACTIVE
    • 1: ACTIVE
    • 2: COMPOSING
    • 3: SENTFORAPPROVAL
    • 4: DECOMMISION
    • 5: MINING

Refer Recording 2024-08-29 at 08.39.42.gif


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.