cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple values for where condition in Query template

aravinth_anandhan
Active Participant
0 Kudos

Hi All,

How to pass multiple or more than one values for [Param.1] in fixed query.

For exapmle, My query is like this,

In MII

SELECT * FROM Customers

WHERE City IN '[Param.1]'

In SQL

SELECT * FROM Customers

WHERE City IN ('Paris','London');

In SQL, the above mentioned query is working fine, but same is not working in MII. Please anyone let me know what I am missing ?

Regards,

Aravinth

Accepted Solutions (0)

Answers (1)

Answers (1)

aravinth_anandhan
Active Participant
0 Kudos

I have tried like,

SELECT * FROM Customers

WHERE City IN ('[Param.1]')

and passed value as Paris','London   Now it is working fine.

Former Member
0 Kudos

Hi Aravinth,

Yes, that is how it works.

But in order to avoid any confusion while passing the parameters if some more cities need to be added, I would suggest to give like this

WHERE City IN ([Param.1])

and pass values as 'London','Paris','xyz'

Thanks & Regards,

Anuj

aravinth_anandhan
Active Participant
0 Kudos

Hi Anuj,

I am handling the addition of new values in transaction by concatenating ','  to each values. But your suggestion is more readable and straight forward way to implement. So I am replacing my logic with your suggestion. Thank you very much for your valuable reply.

Regards,

Aravinth