Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Index
Message
De
10/12/1999 14:39:26
 
 
À
10/12/1999 14:26:30
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00301923
Message ID:
00301933
Vues:
24
>I want to create a primary index on my table based upon a combination of two fields. It has 2960 records. I ran a query on it with no duplicates checked it appears to have 12 dups of this combination. Whats the best way to find the dups so I can clean them up. There is no reason for the dups. Thanks.
>
>God Bless,
>S Dyke

Steven,

Try this:

Select column1, column2, cnt(column1) as cnt_cols;
from my_table;
group by column1, column2;
order by cnt_cols desc

Where column1 and column2 are the columns you want your primary index on. When you get this query the dup records will be at the top of the query.

HTH

Jeff
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform