What about using a stored procedure to do it ? You could pass the list for the in as a string and handle it in the stored procedure. Of course that's no help if using sqlite or other that does not support stored procedures. On Apr 10, 2016 1:39 PM, "Stephen Chrzanowski" wrote:
The problem with that Tony is that the the bind might make :myparam a string, so you'll be doing a 1-integer to 1-string comparison, which won't give you any results. Essentially you'll be asking for a list of results whos field is equal to "1,2,3,4", not a list of results in which the field in question contains the numbers 1, or 2, or 3, or 4.
At OP
Due to the nature of the bind mechanism, you won't be able to do it this way. The only way you'll be able to do that is with your program doing string substitution instead of doing the bind. Since you're dealing with integers only, you'll just need to make sure that every entry you're substituting for is actually an integer.
Tony Caduto wrote 35 lines