Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary key and referential integrity verifier
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00208734
Message ID:
00208870
Vues:
21
Repair, I can't help with. But you can check for unique IDs by running a SQL-Select on the primary key, grouping on the count(PK) having count > 1. This will give you a list of duplicate IDs. You can replace the second (or higher) copy of each duplicate with a newly generated key. Unfortunately, if you have child tables you will already have mixed data for two parent records with the same PK. There's no automatic way of cleaning those that I can think of.

HTH
Barbara


>I have a vfp database or custom data dictionary which has primary and candidate keys and referential integrity (some fields must be present in master table fields) defined.
>
>For some reason (part of dbfs are overwritten and file replacing)
>database integrity is violated.
>I need to check the report of violations and, if possible auto-repair them. Is there a such
>utility which allows to re-check, report and repair database
>integrity. I checked vfp ja SDT but haven't find such possibility.
>In real working system, during reindexing a message
>"uniqueness on index violated" appears and index will not created.
>This stops the program at all.
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform