Xref: alice comp.databases.oracle.server:83113
Path: alice!news-feed.fnsi.net!news.idt.net!newsxfer.visi.net!firenze.visi.net!not-for-mail
Reply-To: "Sean  Zhang" <sean@cnfei.com>
From: "Sean  Zhang" <sean@cnfei.com>
Newsgroups: comp.databases.oracle.server
References: <87a0qm$t0q$1@nnrp1.deja.com>
Subject: Re: Identifying duplicate rows
Lines: 62
Organization: C & F Enterprises
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <bw0m4.15289$T2.22036332@firenze.visi.net>
Date: Wed, 02 Feb 2000 20:33:11 GMT
NNTP-Posting-Date: Wed, 02 Feb 2000 15:33:11 EST

Hi , Ronald,

You can simply run a query  ( Or Cursor ) like this:

  Select  number_field, count(*) duplicate_times
  from your_table
  group by number_field
  having count(*) >1;


Hope this helps.

Sean Zhang
sean@cnfei.com

<milesr@my-deja.com> wrote in message news:87a0qm$t0q$1@nnrp1.deja.com...
> Hi all,
>
>  I'm trying to develop the PL/SQL code that can list only numbers that
> are duplicates, for example:
>
>  NUMBER
>   12
>   12
>   13
>   14
>   15
>   16
>   16
>   16
>   16
>   17
>   18
>   19
>   20
>   21
>   22
>   23
>   24
>   24
>   24
>   24
>   24
>
>  The desired output should look like this:
>
> NUMBER
>   12
>   16
>   24
>
>
> Any help would be appreciated.
>
>
> Ronald
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.


