Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I find duplicate records?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00431045
Message ID:
00431183
Vues:
15
Hi!

The same idea. 'Where' will filter out records for count() function.

Select IDField, count(IDField) as nCount
from MyTable
where MyDateField betwen m.ldDate - 10 AND m.ldDate + 10
group by IDField
having nCount>1


>>>I'm switching an index to a primary and am getting a duplicate index message. How can I find the duplicates amoung 1000's without
>>>looking through them all?
>>
>>Select IDField, count(IDField) as nCount
>> from MyTable
>> group by IDField
>> having nCount>1
>
>This question was asked so often, what it definitely should be in a FAQ.
>
>BTW, a little more complicated variation of this problem:
>Find all duplicates, which have the same Id field and date within date specified +-10.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform