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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Rows with duplicate values.

Re: Rows with duplicate values.

From: Jerry Gitomer <jgitomer_at_erols.com>
Date: Wed, 08 Mar 2000 00:00:54 -0500
Message-ID: <38C5DE86.3EAE72D9@erols.com>


rob nelson wrote:
>
> We have a warehouse application that allows employee identity to be
> duplicated. I need to detect when this occurs. Is there a SQL syntax for
>
> SELECT employeeid where rowcount(employeeid) > 1
>
> ?

I don't remember the exact syntax, but try something like:

	SELECT DISTINCT employeeid, COUNT(*)
	FROM table
	HAVING COUNT > 1

You may also need a GROUP BY or ORDER BY employeeid clause. --
Jerry Gitomer
Once I learned how to spell DBA, I became one. Received on Tue Mar 07 2000 - 23:00:54 CST

Original text of this message

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