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 -> Re: Please help me with a simple query!!!

Re: Please help me with a simple query!!!

From: stephen O'D <stephen.odonnell_at_gmail.com>
Date: 15 Dec 2005 13:31:27 -0800
Message-ID: <1134682287.914246.159210@g44g2000cwa.googlegroups.com>

grohrer_at_gmail.com wrote:
> 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!

How do you know what digits you want to get? You must have some way of identifying the set of widgets that you need to extract to find the values to put in the where clause ... Received on Thu Dec 15 2005 - 15:31:27 CST

Original text of this message

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