Igor Tandetnik wrote:
A.J.Millan <[EMAIL PROTECTED]> wrote:
Suppose a table:

CREATE TABLE 'myTable' (
A INTEGER NOT NULL,
B INTEGER NOT NULL,
C INTEGER);

Do is there some query to return if there are some duplicate files
and/or who are they?

Consider duplicate file if there are two or more rows with the same
values. I.E:

two or more with same values  A=X, B=Y, C=Z

or

A= X, B=Y, C=NULL

for any 3-tuple X Y Z

select t1.A, t1.B, t1.C
from myTable t1, myTable t2
where t1.A = t2.A and t1.B = t2.B and
 (t1.C = t2.C or (t1.C is null and t2.C is null));


I think that something like:

select A, B, C from myTable except select distinct A, B, C from myTable;

should work, too.

Gerry

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to