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: Query to find non-unique records

Re: Query to find non-unique records

From: Steve Rainbird <steve.rainbird_at_mssint.com>
Date: Thu, 26 Apr 2001 11:29:05 +0100
Message-ID: <9c8t9j$i8f$1@neptunium.btinternet.com>

Try this.

SELECT COUNT(*), id,tag1,tag2
FROM table
GROUP BY id,tag1,tag2
HAVING COUNT(*)>1; "ewong" <ewong_at_ewong.com> wrote in message news:3AE73AAA.D72BE84_at_ewong.com...
> I have a table:
> id integer,
> tag1 varchar2(5),
> tag2 varchar2(5),
> text clob
> ...
>
> The primary key is (id,tag1,tag2). I disabled the pk couple days ago
> and find that I am not able to enable it anymore because some new
> records don't have unique pks on the three columns. How can I do query
> to track down those non-unique records?
>
> Thanks.
>
Received on Thu Apr 26 2001 - 05:29:05 CDT

Original text of this message

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