I have a List (Of String) that matches the "types" in our database table.
We are using the ADO.NET DB2 provider, and my final query should look something like this:
select * from table where type in (@type1, @type2, @type3, @type4)
In the past, I built a list of query parameters / host variables using a ForEach loop, but I would really like to find out how to create them in one line. Of course, I can join all the lines, but adding "@", and an increasing number gives me headaches.
Anyone have any ideas on how to do this?
source
share