This content has been marked as final. Show 2 replies
select * from hogehoge where col1 in (1...5000);-> error
select * from hogehoge where col1 in (1..1000) or col1 in (1001..2000) or col1 in (2001..3000) or col1 in (3001..4000) or col1 in (4001..5000);-> may be OK
Although the trick of using OR would likely work, why don't you use a dynamic collection on the right-hand-side of the where in clause?
This thread has details Re: Binding collection to right-hand-side of WHERE num_col in (:1) clause?
Binding a VArray is not super easy, but at least with a bind value (the collection), you can have a single prepared statement, and vary just the collection you pass in. --DD