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: Duplicated Row Queries

Re: Duplicated Row Queries

From: Paul <paul_at_tiggerbounce.freeserve.co.uk>
Date: 2000/03/01
Message-ID: <89k5d4$gu3$1@news6.svr.pol.co.uk>#1/1

Niels,

If table contains columns col1, col2 ... colN then this query will return rows with duplicate values on col1 ... colN:

SELECT col1, col2, ..., colN, COUNT(*)
FROM yourTable
GROUP BY
col1, col2, ..., colN
HAVING COUNT(*) > 1 Paul
Oracle Analyst / Programer

Niels Lippke <c0032019_at_tu-bs.de> wrote in message news:Pine.HPX.4.10.10003011223151.11268-100000_at_rznb33.rz.tu-bs.de...
> On Tue, 29 Feb 2000, rockcogar wrote:
>
> > Niels,
> >
> > You question is not at all clear.
> >
> > Could you restate your question ?
 

> > I think that what you are asking can be solved very quickly.
 

> > Rock.
> >
> >
>
> Ok, consider a table of 10 columns. An special mechanism inserts rows into
> this table every day. as there are no constrains concerning unique columns
> equal rows are inserted more than one time.
> eg (table with just 2 columns):
> mytable | column A | column B
> ------------------------------
> | "Niels" | 25
> | "Steve" | 31
> | "Niels" | 25
>
> No I want oracle to determine these rows, that apear at least twice in my
> table. In this case "Niels 25".
> As my table consists of 10 columns and approx. 20.000 rows
> a cartesian product (mytable x mytable) is not a feasible
> solution (takes to much time).
>
> Cheers, Niels
>
> -------------------
> Niels Lippke
> Technische Universitaet, Braunschweig
> Gruppe Verwaltung und Planung
>
Received on Wed Mar 01 2000 - 00:00:00 CST

Original text of this message

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