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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Select nonDistinct?

Re: Select nonDistinct?

From: Luiz da Silva <big57arf_at_optonline.com>
Date: Sun, 10 Sep 2000 01:14:05 GMT
Message-ID: <xfBu5.9386$En.1001758@news02.optonline.net>

Thank you. This did exactly what I wanted - I've never used "having" for anything before, so I wasn't familiar with it.

Thanks again,

Lou

"Nascar" <nascar_at_flash.net> wrote in message news:4Osu5.801$oc3.77345_at_news.flash.net...
> if ID is the column you want to see dupes for:
>
> select id from dasilva_table
> group by id having count(*) > 1
>
> "Luiz da Silva" <big57arf_at_optonline.com> wrote in message
> news:BGiu5.1236$En.524404_at_news02.optonline.net...
> > Hi all,
> >
> > My first question to the group.
> >
> > I know that I can use Select Distinct ... to return non-duplicate rows
 in
 a
> > table, but is there any way to bring back only the rows that are
 duplicated.
> > By this I mean, suppose my table looks something like this:
> >
> > id_number name
> > 1 Lou da Silva
> > 2 Fred da Silva
> > 1 Alan da Silva
> > 3 Figaro da Silva
> > 4 Felix da Silva
> > 2 Pendejo da Silva
> >
> > SELECT DISTINCT Id_Number FROM Dasilva_Table;
> >
> > will bring back
> >
> > id_number
> > 1
> > 2
> > 3
> > 4
> >
> > What I would like to do is something like this:
> >
> > SELECT NONDISTINCT Id_Number FROM Dasilva_Table;
> >
> > and get back:
> >
> > id_number
> > 1
> > 2
> >
> > Thanks in advance and thanks for all the help you've provided indirectly
 to
> > me by replying to other people's questions.
> >
> >
> >
> >
> >
> >
>
>
Received on Sat Sep 09 2000 - 20:14:05 CDT

Original text of this message

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