Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01795:maximum number of expressions in a list is 1000

Sambasivarao Medavarapu-OracleMar 19 2013 — edited Mar 19 2013
Hi,

JDev 11.1.1.5.0

I've a usecase, where i need to pass more than 1000 values for IN clause.
I found that, there is some restriction in number of values for IN clause to 1000.

I got following reference on this issue
2300148

Conclusion:
there are two options to fix this issue
Fix 1:
You can have any number of tuples, not just 1000, in an IN-list like this:
(id, 0) IN ( (1,0), (2,0), (3,0), (5,0), (8,0), ... )


Fix 2:
Use global temporary table to populate values and then use the temp table
select * from table A1 where A1.ID in (Select ID from temp_table)

Please suggest the best option to fix our issue.


As of now, i am applying IN clause as

inClause = (1,2,3,4,5...)
criteriaRow.setAttribute("id", inClause);

I can prepare inClause as per Fix 1. But iam concern about setting attribute as (id,0)

can you suggest a way to apply as (id,0) IN (...)

Thanks in advance,
Samba.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2013
Added on Mar 19 2013
3 comments
654 views