Trying to avoid using the IN Clause in SQL statment

[email protected]
Newsgroups gmane.comp.db.oracle.devel
Message-ID <LYRIS-1796914-801350-2002.12.13-18.56.23--gcdod-oracle#[email protected]>
I have an ASP page that allows a user to submit a text file that is 
composed of one column of say... inventory stock numbers. I grab the file 
and retrieve the numbers. I then want to query several tables in an Oracle 
8.1.7 database for information for these values. I currently have designed 
the SQL like this.

   "SELECT sometable.something, othertable.otherthing FROM sometable, 
othertable WHERE stockNumber IN ('VAL1','VAL2'.....)"

I realize this is inefficient for a large qty of "VALs" so I have limited 
the size of the file the user can submit however this is not a long-term 
solution. 

  I am looking for some advice on maybe creating a temporary table and 
inserting the values into the table where then I can run queries against 
it efficiently. I know I could create table and "INSERT INTO .... VALUES
( ... )”, but is there an even better approach. Suggestions would be 
greatly appreciated.


  
---
Change your mail options at http://p2p.wrox.com/manager.asp or 
to unsubscribe send a blank email to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.