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

Home -> Community -> Usenet -> c.d.o.server -> Retrieve only recs that =1 and not > 1?

Retrieve only recs that =1 and not > 1?

From: Zekmoe <zekmoe_at_aol.com>
Date: 01 Jul 1999 01:53:00 GMT
Message-ID: <19990630215300.11035.00005359@ng-fm1.aol.com>


Hello,
I am trying to retrieve only the records in a table that are equal to a value, and don't have additional records with values greater. To clarify, the table is simplified like this:

IDNum        Status
 123              1
 123              2
 123              3
 124              1
 124              2
 125              1
 125             2 
 125             3

I need to get all the IDNum that are Status 2 but have not yet reached status 3. Therefore I only need IDNum 124. Something like this (pseudo) Select IDNum from table where IDNum = 2 but not greater than 2; If I just specify < 3, I get 123 and 125 where the Status is 2. Any help greatly appreciated.
Bob Maggio
zekmoe_at_aol.com Received on Wed Jun 30 1999 - 20:53:00 CDT

Original text of this message

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