should be something like .....

         select custid 
         from   sample o
         where  status='F'
         group by custid , status
         having count(*) >=1
         and count(*) != (
                    select count(*)
                    from   sample i 
                    where  i.custid=o.custid )

Big P

----- Original Message ----- 
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Saturday, June 23, 2001 5:20 PM


> 
> --- Leslie Lu <[EMAIL PROTECTED]> wrote:
> > 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.
> >
> > --- Leslie Lu <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > If I have this:
> > > Customer_id  Status
> > > ---------- -----------
> > > 1           F
> > > 1           A
> > > 1           B
> > > 2           F
> > > 2           F
> > > 3           A
> > > 3           B
> > >
> > > How do I found out a customer who has both F and
> > not
> > > F
> > > for them.  (If he only gets F, or gets other than
> > F,
> > > that's fine).  In this case, I should get 1.
> > Thank
> > > you!  I need this badly!
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get personalized email addresses from Yahoo! Mail
> > > http://personal.mail.yahoo.com/
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> >
> 
> 
> __________________________________________________
> 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: [EMAIL PROTECTED]
> 
> 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: [EMAIL PROTECTED] (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: Big Planet
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to