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

Home -> Community -> Usenet -> c.d.o.server -> Re: how to select a 'not unique' field?

Re: how to select a 'not unique' field?

From: Mike Krolewski <mkrolewski_at_rosetta.org>
Date: Fri, 15 Dec 2000 00:51:42 GMT
Message-ID: <91bpus$p3t$1@nnrp1.deja.com>

In article <91boqe$o5i$1_at_nnrp1.deja.com>,   susana73_at_hotmail.com wrote:
> I have a table called OBJECT and with RESULTID column. The RESULTID
> column is not a PK and is not necessarily be unique. How can I SELECT
> all the id that is NOT UNIQUE?
>
> Thanks!
> Susan
>
> Sent via Deja.com
> http://www.deja.com/
>

Strange data organization....

This should get all the resultid that have more than 1 row. If the table is big, runtime will be long.

select resultid
from OBJECT
group by resultid
having count(resultid) > 1

--
Michael Krolewski
Rosetta Inpharmatics
mkrolewski_at_rosetta.org
              Usual disclaimers


Sent via Deja.com
http://www.deja.com/
Received on Thu Dec 14 2000 - 18:51:42 CST

Original text of this message

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