akkapolk
(Akkapol Kinbuangam)
January 17, 2019, 6:43am
1
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,
"'value1','value2'"
akkapolk
(Akkapol Kinbuangam)
January 17, 2019, 7:06am
3
@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.
http://www.sommarskog.se/arrays-in-sql.html
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f8cf78f5-f35c-47cd-9de9-63400565fd50/use-multiple-values-from-parameters-in-tsql-query?forum=transactsql
Regards,
Karthik Byggari
1 Like
akkapolk
(Akkapol Kinbuangam)
January 21, 2019, 8:11am
5
@KarthikByggari , Thank you very much for the concept.
1 Like
Manish540
(Manish Shettigar)
December 27, 2019, 7:23am
6
Can you tell me, how to use the in arguments inside the query???..
@akkapolk
balupad14
(Balamurugan (BalaReva))
December 27, 2019, 7:26am
7
Hi @akkapolk ,
Here is the sample project for passing parameter to the ExecuteNonQuery…
Hi @ramawat ,
I made a test what @Pablo_Sanchez mentioned with a little table. It is working fine. can you attache the table script and your insert query as a zip file. May be it helps to do the analysis.
But any way, Here I have attached xaml and table for your reference.
SqlServer.zip (2.7 KB)
Regards
Balamurugan.S
Regards
Balamurugan.S
1 Like