Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/12/2024 12:23 AM
Hi Team,
I need help in developing an enhanced query for the below scenario,
I want to update all the accounts' (having Status = Manually Suspended) present for an endpoint XYZ (ENDPOINTKEY = 100) to update the status to Suspended From Import Service. I can update the status for a specific account with the below query:
SELECT
"XXXXXXX-Delted on-08-01-2023 15:42" AS accounts__name,
"SUSPENDED FROM IMPORT SERVICE" AS accounts__status,
accountkey AS accounts__PRIMARYKEY
FROM
accounts
WHERE
accountkey = '111111';
But how can I update the status of all the accounts?
Solved! Go to Solution.
08/12/2024 01:14 AM - edited 08/12/2024 01:14 AM
Try this
SELECT
"XXXXXXX-Delted on-08-01-2023 15:42" AS accounts__name,
"SUSPENDED FROM IMPORT SERVICE" AS accounts__status,
accountkey AS accounts__PRIMARYKEY
FROM
accounts
WHERE
endpointkey=100 and status in ('Manually Suspended')
08/12/2024 02:21 AM
Hi @NM
Thanks for your quick support.
I need some more help on this. I want to pass the AccountName instead of the Dummy value.
I tried this query but no help.
SELECT
"(select name from accounts) -Delted on-08-01-2023 15:42" AS accounts__name,
"SUSPENDED FROM IMPORT SERVICE" AS accounts__status,
accountkey AS accounts__PRIMARYKEY
FROM accounts
WHERE
endpointkey=100 and status in ('Manually Suspended')
08/12/2024 02:23 AM - edited 08/12/2024 02:24 AM
@biswajitoram try this
SELECT
Concat(name,'-Delted on-08-01-2023 15:42') AS accounts__name,
"SUSPENDED FROM IMPORT SERVICE" AS accounts__status,
accountkey AS accounts__PRIMARYKEY
FROM
accounts
WHERE
endpointkey=100 and status in ('Manually Suspended')
If you find the solution helpful please accept the solution and hit kudos button.
08/12/2024 03:01 AM
@NM Thanks for your quick support. It worked.
08/12/2024 11:52 PM - edited 08/12/2024 11:56 PM
Hi @NM
I have one more requirement, can we add the current date and timestamp instead of static value?
Concat(name,'-Delted on-08-01-2023 15:42') AS accounts__name,
08/12/2024 11:58 PM
08/13/2024 12:09 AM
08/13/2024 12:28 AM
Thanks @NM & @rushikeshvartak for your support