Paramertized SQL for IN clause

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
1 post Page 1 of 1

atarrant

Posts: 10
Joined: Tue Mar 27, 2012 7:59 pm

Post by atarrant » Mon Mar 09, 2015 10:22 am
I'm gathering a list of IDs in my Project which I'm currently forming into a comma separated list "listOfIDs" and then at the end I'm looking to pull records from the database based on the list.

So listOfIDs looks like this: 56347,75647,23467

select a,b from tablex where id in (?)
parameter 1: ${listOfIDs}

Normally in Java I would pass this list in as an array and I see array as an available datatype in the parameter but am not sure how to form the data into an array. Not sure the best route on this.
1 post Page 1 of 1