Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Enhanced query Execution to update account owner

MahammedRaffi
New Contributor
New Contributor

Hello,

Can anyone help us with the 'Enhanced query Execution' Query to update the Account owner, where we need to add "User Group"(static group) to all the accounts.
Actually our customer is not ok with CSV approch.

Appreciate your help!

5 REPLIES 5

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @MahammedRaffi 

We are working on it and will keep you posted.

Regards,

Dhruv Sharma

rushikeshvartak
All-Star
All-Star

Its not working due to RANK column name 

select 2 AS accountowners__accountkey,2095 AS accountowners__OWNERUSERGROUPKEY,null as accountowners__OWNERUSERKEY,1 AS accountowners__RANK, sysdate() AS accountowners__UPDATEDATE , 1 AS accountowners__UPDATEUSER from accountowners

rushikeshvartak_0-1702098192974.png

This is defect as RANK is reserved Mysql keyword

https://dev.mysql.com/doc/refman/8.2/en/keywords.html 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

MahammedRaffi
New Contributor
New Contributor

 

Is this possible to convert below query into Enhanced Query Execution query for Insert Operation ?

insert into accountowners (accountkey,ownerusergroupkey,rank)
select accountkey,45,1 from accounts where endpointkey=XX and ACCOUNTTYPE='Service Account' and accountkey not in (select accountkey from accountowners) and status!='SUSPENDED FROM IMPORT SERVICE';

I tried by updating above query as below :

select a.accountkey AS accountowners__accountkey, XX AS accountowners__OWNERUSERGROUPKEY,'1' AS accountowners__RANK,sysdate() AS accountowners__UPDATEDATE , 1 AS accountowners__UPDATEUSER from accountowners ao, accounts a where a.endpointkey=XX and a.ACCOUNTTYPE='Service Account' and a.accountkey not in (select ao.accountkey from accountowners ao) and status!='SUSPENDED FROM IMPORT SERVICE';

 

Now Saviynt says, Only one table allowed for insert operation error.

 

Any thoughts ?

 

Hi @MahammedRaffi 

Multiple table update is not allowed in enhanced query. 

Regards,

Dhruv Sharma

Here issue with mysql reserved keyword


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.