Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8109793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:31:56+00:00 2026-06-06T01:31:56+00:00

I need to devise a subquery to select the rows having matching values in

  • 0

I need to devise a subquery to select the rows having matching values in a column.

Example

Select * 
from person 
where first_name in ('Java','SQL','Oracle');

However this list inside the parenthesis can be big, upto 30,000 values. I will be reading the values from a file and will be passing it inside this the parenthesis. However I thought there might be a limitation to the number of values that I can provide inside the parenthesis. Is there an optimal solution to address this scenario without creating and loading a new table with data?

EDIT: Thanks for your responses. Is the below query an option to be considered –

Select * 
from person 
where first_name like 'Java' 
   or first_name like 'SQL' 
   or first_name like 'Oracle';

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:31:58+00:00Added an answer on June 6, 2026 at 1:31 am

    I agree with Jonathan, concetanating 30000 values is not the way to go here, and his solution is a good way. But here is another idea, Oracle has a nice feature called External Tables.

    With External Tables, you can treat a file as if it is a table. If your file is well structured (like CSV) you can easily use this feature.

    Google “Oracle External Tables” and you’ll find a lot of information and examples, but for starters read this:

    Basically, you’ll need a directory object to tell Oracle where your file is located, then you will create the External Table, perhaps something like below:

    create directory DIR_MYFILE as '/my_source_dir/';
    
    create table EXT_MY_FILE
        ( 
          some_id    number(8),
          some_value varchar2(100)
        )
       organization external
       ( default directory DIR_MYFILE 
         access parameters
         ( records delimited by newline
           fields terminated by ','
         )
         location ('my_file.csv')  
     );
    

    Using this table in your query:

    select * from person where first_name in (select some_value from EXT_MY_FILE);
    

    EDIT: See APC’s comment, he has a good point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to capture keystokes from a wedge device and prevent any controls or
EDIT: All I need is render /devise/registrations/edit in /settings/password To do that put this
I need to know how configure the gem devise,Im using ruby 1.9.2, rails 3.1.3,
I need to convert an app authentication to self/custom authentication over devise. The existing
I need to implement a login web service in RoR 3. I applied Devise
I'm using Rails 3.0.9, Ruby 1.9.2, Devise 1.3.4 and has a need in Devise
I need to override devise in a such way that when user sign up
I need to override Devise sessions controller during the login process (Rails 3.0.9, Ruby
I need to create reusable Devise extension. This is my first experience of creating
I using devise gem for registration but i have problem. my table include: first_name,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.