Parameterizing a SQL IN clause on an integer column?
-
18-09-2019 - |
Question
Jeff Atwood asked the original question about parameterizing a SQL IN clause, but I want to do this with an integer column. If I try the code from the original post I get the following exception, which makes sense:
Conversion failed when converting the varchar value '%|' to data type int.
Anyone try this before?
Solution
I think that Jørn Schou-Rode gave the best answer in the comments where he links to the top answer from this question:
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow