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

can we add multiple condition in select query in enhanced execulte query

WeAreVoid
New Contributor III
New Contributor III

HI, 

 

select concat(AT.provisioningcomments,'-Manually_Actioned_BAU') as arstasks__provisioningcomments, AT.taskkey as arstasks__PRIMARYKEY from arstasks AT where AT.taskkey in
()

we are getting error when we are passing more than 6 taskkey in this query.

it is working fine for 5 taskey. can someone help here? is there any limit in 24.3 version

 

13 REPLIES 13

WeAreVoid
New Contributor III
New Contributor III

one more issue:

we are trying to update provisioning comment of task whose corresponding account is suspended from import service.

Query:

select concat(AT.provisioningcomments,'-Manually_Actioned_BAU') as arstasks__provisioningcomments, AT.taskkey as arstasks__PRIMARYKEY from arstasks AT where AT.taskkey in
(1234567)

 

we are not able to do so. getting error: ARSTASKS : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'accountkey of Task' does not exist or one of its queried refer

use below query

SELECT Concat(Ifnull(AT.provisioningcomments, ''), '-Manually_Actioned_BAU') AS
       arstasks__provisioningcomments,
       AT.taskkey                                                            AS
       arstasks__PRIMARYKEY
FROM   arstasks AT
WHERE  AT.taskkey IN ( 1234567 ); 


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

Amit_Malik
Valued Contributor II
Valued Contributor II

Use this : need to handle provisioningcomments being null

select concat(ifnull(AT.provisioningcomments,'Empty'),'-Manually_Actioned') as arstasks__provisioningcomments, AT.taskkey as arstasks__PRIMARYKEY from arstasks AT where AT.taskkey in (48508);

I have tested it with below and it works so shoud not be any limit on values inside "in"

select concat(ifnull(AT.provisioningcomments,'Empty'),'-Manually_Actioned') as arstasks__provisioningcomments, AT.taskkey as arstasks__PRIMARYKEY from arstasks AT where AT.taskkey in (48508,48609,48608,48607,48606,48605,48604,48505,48504);

 

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

You can add for multiple please share logs


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

WeAreVoid
New Contributor III
New Contributor III

want to set refrence key as null in EIC version:

 

select null as ACCOUNTS__referenced_accountkey, A.accountkey as ACCOUNTS__PRIMARYKEY from ACCOUNTS A where A.accountkey in (607897971)

 

but getting error: Error while updating table: ACCOUNTS : Incorrect integer value: 'null' for column 'REFERENCED_ACCOUNTKEY' at row 1

Does your original question resolved ? @WeAreVoid 

You can't set null in REFERENCED_ACCOUNTKEY


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

can we add dummy integer value?

for ex- 0 or negative value

You can map to any suspended account


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

@rushikeshvartak Can't we set the REFERENCED_ACCOUNTKEY to null?

Screenshot 2024-09-12 at 1.38.15 PM.png

@WeAreVoid  can you try this:
select '' as ACCOUNTS__referenced_accountkey, a.accountkey as ACCOUNTS__PRIMARYKEY from ACCOUNTS a where a.accountkey in (607897971)


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

WeAreVoid
New Contributor III
New Contributor III

we have tried tried below format . but it is not working

''

'NULL'

NULL

stalluri
Valued Contributor
Valued Contributor

@WeAreVoid 
We can't pass 0 or -1 it has to have the accountkey. Pass any dummy accountkey from accounts table.


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

Its foreign key hence it can’t be null


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

Hi, yes orginal question is resolved.

We can pass multiple taskkey in in () operator.