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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Query help !!!

RE: Query help !!!

From: Nicoll, Iain (Calanais) <iain.nicoll_at_calanais.com>
Date: Fri, 22 Jun 2001 10:45:02 -0700
Message-ID: <F001.003340A0.20010622105247@fatcity.com>

Leslie,

The query below will find all those with any number of 'F's and at least one status that is not 'F'.

select distinct customer_id
from mytablename t
where status = 'F'
and exists (select ''

              from mytablename t2
              where t2.customer_id = t.customer_id
              and   t2.status     != 'F')

Cheers

Iain Nicoll
-----Original Message-----
Sent: 22 June 2001 19:06
To: Multiple recipients of list ORACLE-L

Just to clearfy my previous question (as follow):

if 1 has F and A and B, that what I want.

If 1 has F all the time, that's not what I want. If 1 has A, B, C, but never F, that's not what I want either.


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Leslie Lu
  INET: leslie_y_lu_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Nicoll, Iain (Calanais)
  INET: iain.nicoll_at_calanais.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jun 22 2001 - 12:45:02 CDT

Original text of this message

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