Forum OpenACS Q&A: IN clause limitation

Collapse
Posted by Ali Zahid on
I am using Oracle for winwdows NT SQL Plus 3.3.
I need to serach records using IN clause .. There i have more than 1000 parameters to give in IN clause.
Is there any way i can give more than 1000 parameters in the IN clause, Because i have data in Bulk.. lets say i need to search records with 50000 parameters.

For e.g.

select abc,xyz from test where xyz in (1,2,3,.......,1000,......2000,....5000)

Is there anyway i can do it???

Collapse
2: Re: IN clause limitation (response to 1)
Posted by Sebastiano Pilla on
Look up http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:210612357425

For example, quoting from the above page: "if you have such a seriously big inlist -- i would suggest you do not use this technique but consider loading the stuff into a global temporary table using bulk inserts and then query "where in (select * from gtt)""