Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Please help me with a simple query!!!

Please help me with a simple query!!!

From: <grohrer_at_gmail.com>
Date: 15 Dec 2005 12:18:36 -0800
Message-ID: <1134677916.772046.260890@g43g2000cwa.googlegroups.com>


I have a table which contains information regarding widgets. Each widget has a Department Number and a Product Number.

I need to query the table for a specific set of widgets...about 100 in all.

I'm familiar with the basic queries such as:

SELECT *
FROM projectTable
WHERE prodNum IN ('002312','023124','254124')

which works great if your only querying with a single specific field.

The only other method I know if is to do the following:

SELECT *
FROM projectTable
WHERE (deptNum = '01' AND prodNum = '002312') OR (deptNum = '02' AND prodNum = '002314') OR .......

Using this method for a hundred widgets would make for a pretty sizable query string.

Is there another method which is better and effecient?

Thanks in Advance! Received on Thu Dec 15 2005 - 14:18:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US