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: Duplicate Fields - A CHALLENGE !!

Re: Duplicate Fields - A CHALLENGE !!

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 13 Sep 1999 10:29:42 +0100
Message-ID: <937215368.29387.4.nnrp-06.9e984b29@news.demon.co.uk>


select item, description, area_key
from items
where (description, area_key) in

    (select description,area_key

         from items
        group by description,area_key
        having count(*) > 1

    )
;

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

Gareth Elliott wrote in message
<049F56710FD6D211B08D006097A4426B10F112_at_ORION>...
>Hi
>
>Im trying to find out if any duplicate descriptions exist within one
>area_key.The following sql does this.
>
>select description,area_key
>from items
>group by description,area_key
>having count(*) > 1
>
>I also need to return the item_no from items for the records returned from
>the above sql. This field is always unique and therefore the count(*) > 1
>will return nothing if item_no is just added to this statement.
>
Received on Mon Sep 13 1999 - 04:29:42 CDT

Original text of this message

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