How to add many Parameters to ExecuteNonQuery, for IN() function in Sql?

I add ExecuteNonQuery activity as picture below.

I set Sql as code and picture below.

UPDATE [dbo].[Calendar] SET [Active] = 0 WHERE [CalendarID] IN (@CalendarID)

First scenario, I have one CalendarID and set Parameters as picture below. It’s work, updated column in database.

Second scenario, I have two CalendarID and set Parameters as picture below. It’s not work.

Could someone please help to suggest me?

1 Like

Try with the following value,

@KarthikByggari, I had tried for both picture below. It’s still not work for both.

Here IN is an operator. So it expects a set of values but not string value.
That’s why it is failing. There are alternative ways how to pass the list of values as a parameter.
Please check the below links for an idea.

Karthik Byggari

1 Like

@KarthikByggari, Thank you very much for the concept.

1 Like

Can you tell me, how to use the in arguments inside the query???..

Hi @akkapolk,

Here is the sample project for passing parameter to the ExecuteNonQuery…


1 Like