Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Repeated records
Message
De
01/08/2007 17:54:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
01/08/2007 17:08:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01245292
Message ID:
01245311
Vues:
22
>Hi everyone
>
>How can I detect the repeated records in a table ?....
>
>Thanks in advance
>Carlos Burgos

Basically a SELECT, with a GROUP BY clause.

If your primary key is called PKField, the code would be something like this:
select PkField, count(*) as HowMany;
  from MyTable;
  group by PkField;
  having HowMany > 1
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform