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_at_nnrp1.deja.com>


[Quoted] 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
[Quoted] having count(resultid) > 1

--
Michael Krolewski
Rosetta Inpharmatics
mkrolewski_at_rosetta.org
              Usual disclaimers


Sent via Deja.com
http://www.deja.com/
Received on Fri Dec 15 2000 - 01:51:42 CET

Original text of this message