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: SQL Query - Selecting records that repeat / occur more than once in a table -- newbe question

Re: SQL Query - Selecting records that repeat / occur more than once in a table -- newbe question

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 11 Feb 2004 22:28:07 -0600
Message-ID: <uptckzzxl.fsf@standardandpoors.com>


On 11 Feb 2004, nbsj67_at_yahoo.com wrote:
> I need to find customer's names that repeat / occur more than
> once in the same table. I have treid many options and I have
> tried comparing the column to itself but Oracle gives me an
> error.

select cust_nm, count(*)
from table
group cust_nm
having count(*) > 1;

-- 
Galen Boyer
Received on Wed Feb 11 2004 - 22:28:07 CST

Original text of this message

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