Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

PHP Search for rows given an array of ID's

943758Jun 14 2012 — edited Jun 15 2012
Given an arbitrarily large array of ID's, I want to search an Oracle table for each row based on the ID's in said array and return the results. I can't find a decent way to do this, however, as the array can contain thousands upon thousands of ID's. Obviously, "WHERE IN ()" would not work, as the array can be much larger than 1000.

Initially, I tried to insert all of the ID's into a global temporary table to do an inner join against but I cannot seem to get this to work. I believe the size of the query gets too large? I have been banging my head against the wall on this for a while and all I can find online is the solutions that work for inserting only a relatively small number of rows, "INSERT ALL" for example.

I can't be the first person in the world who has needed to do a search based on an array of ID's. Can anyone help me?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2012
Added on Jun 14 2012
6 comments
622 views