and more in a single search tool across platforms. Read the announcement here. |
11/26/2023 09:38 PM
I am trying to create a mechanism to automatically make the Role status Inactive over a period of time by following these steps:
① Add "-old" to the end of the Role Name of the Role with "FY 2311" in the Role Description.
② Make the status of the Role with "-old" in the Role Name Inactive.
In v23.1, Execute Extension Queries (QUSTOMQUERYJOB) were used for the above procedure, each updating a Role with the following query:
① update roles set role_name = concat (role_name, '-old') where role_description like '%-old%'
② update roles set status = 0 where role_name in ('-old')
However, in production, the version was changed to v23.8 and this Job type does not exist.
Instead, there is a Job type "Enhanced Query Execution," but you cannot use the above query because you can only use SELECT statements.
How can you do this in v 23.8?
Solved! Go to Solution.
11/26/2023 09:52 PM
SELECT CONCAT(ROLE_NAME, '-OLD') AS ROLES__ROLE_NAME,ROLEKEY AS ROLES__PRIMARYKEY FROM ROLES R WHERE R.ROLE_DESCRIPTION LIKE '%-OLD%'
SELECT 0 AS ROLES__STATUS,ROLEKEY AS ROLES__PRIMARYKEY FROM ROLES R WHERE R.ROLE_NAME LIKE '%-OLD%'