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 -> select only a group of rows with certain criteria

select only a group of rows with certain criteria

From: <tinschel_at_yahoo.com>
Date: 2 Aug 2005 17:01:21 -0700
Message-ID: <1123026897.759146.96130@g43g2000cwa.googlegroups.com>


we are using Oracle as a metadata repository and we are running into the following problem:

we have a table with data as follows:

data_id | group_id


100      |  110
100      |  111
101      |  110

We would like to create a select statement that selects a group of data_ids (either '100' or '101' in this example) ONLY if that group does not have group_id 111. So in this example only '101' should be selected.

Any ideas how to accomplish this in a single query?

Tino Received on Tue Aug 02 2005 - 19:01:21 CDT

Original text of this message

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