Information générale
Catégorie:
Codage, syntaxe et commandes
if I understand what you want basically you should treat this as a coumpund
index
you may have to do some type conversions but assuming that both fields are
character
thus, something like
SELECT keyfieild,field2, recno() as REC() ;
from Table where KEYfield+field2 in (SELECT Keyfield+field2 as CompKey from
Table Group BY 1 Having COUTNT(compkey) >1
should work
Arnon
>
>Can someone help me with the SQL to find duplicate records in a table where
> a duplicate is considered two out of five matching fields? I thought:
>SELECT * ;
>FROM table;
>WHERE keyfield IN ;
>(SELECT keyfield ;
>FROM tablel ;
>GROUP BY keyfield, field2;
>HAVING count(*) > 1)
>would do the trick, but it doesn't work. TIA
>
>Erik
>
>
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement