Skip to Main Content

Java Database Connectivity (JDBC)

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!

Problem with SQL where IN clause

843859Aug 23 2005 — edited Oct 24 2006
Hi Everyone

I know this issue is not related to JDBC. Its more an sql question.

I'm using ORACLE database. I have a query that looks something like this.

select distinct sp.first_nm,
sp.last_nm,
psp1.prfl_value_txt
from person sp,
prfl_person psp1,
acct asi
where sp.src_person_id = psp1.src_person_id
and psp1.prfl_value_id=6
and asi.acct_id in (200328,204659,237316,237592,238507,240121,300014,309084,330073,330614,340083)

The problem is the acct_id's is a huge list of nearly 2500 accounts. And I just learnt that the maximum number of expressions in a list can only be 1000.

Is there any kind of a work around this. Did anyone else encounter this problem and how did u solve it.

Any help would be appreciated.
Thanks
Gublooo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2006
Added on Aug 23 2005
22 comments
1,274 views