Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why duplicated record?
Message
De
27/03/2003 09:10:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
27/03/2003 02:55:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00770635
Message ID:
00770727
Vues:
12
>Hi,
>I used to see couples of thread that asking about how to delete the duplicated record.
>I just would like to know, why duplicated record will occured? Does PK or candicate key take care of the uniqueness, doesn't it?
>Or, any other case that will cause duplicated record?
>
>Sorry for my innocent.
>
>Thank you.

A primary or candidate index is a very good way to avoid duplicates in the first place. You should usually not get duplicates if you have the indices. In rare occasions, you might still get duplicate records - perhaps due to index corruption.

You will still have to eliminate duplicate records created before you started using a candidate index. In fact, VFP won't even allow you to create a candidate index if there are duplicates, so you have to delete the duplicates (or change some values) before indexing.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform