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!

Reference list of Identifiers from external file (ie .txt file)

763900May 25 2011 — edited May 25 2011
Hello All,

I was hoping someone may be able to help me with a conceptual (and then technical...) line of thought?

I have a list of roughly 7000 loans to interrogate in an excel spreadheet or text file, is there a way I can get my query to reference this list, regard it as a temporary table and join it to an SQL query?

The list of loans are unique 8 digit identifiers. I have a very simple SQL query over two core tables that brings back the balance and currency for all loans on our system but I want to get these fields for the 7000 loans in question only.

I would normally just query all the loans and use a vlookup in Excel but the numbers are too big to make this viable.

The only method I currently have in place is to loop through the identifers one by one, querying each separately. Running the same query 7000 times seems rather inefficient!!

Is this a reasonable concept? If so I shall need some help with how to reference the external file, which will be gratefully received!!

Thank you :)

Jon
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2011
Added on May 25 2011
6 comments
201 views