Pass Long Array as query Parameter in SQL query.

aman10088 years ago

I have a Query

SELECT * from devices where id IN(:deviceIdArray) # 1,2,3,4

now after parse this becames
SELECT * from devices where id IN(?);

now i want set an array to pass inside 'IN' my query.
If i pass it as String, it'll append '' that will make wrong IN Query. # '1,2,3,4'
Is there any mechanism that can help in set IN to array.

Anton Tananaev8 years ago

Why would you want to do that? I'm sure there is a better solution for your problem.

aman10088 years ago

So, how can i achive the solution of this problem??

Anton Tananaev8 years ago

Can you please explain the problem. Where does the list come from and why do you need it?