Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtered Primary Keys
Message
De
11/08/1999 17:09:22
 
 
À
11/08/1999 14:30:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00252652
Message ID:
00252744
Vues:
7
>I have an application where I'm not deleting
>records from a table, just terminating them
>by putting a value in TermDate (for archival
>purposes). This obviously causes problems
>if the same record is added again at some
>future point.
>
>The primary is a compound key.
>I thought that filtering the key on
>TermDate = {//}
>might work, but if it did I wouldn't be
>writing now :-)
>
>Is there a standard way of handling this
>outside of changing out key fields?

The standard way is not to reuse primary keys. In fact, if you do reuse, technically you don't have a primary key. You need to add a condition to the PK in order to do this. For example, FOR EMPTY(TermDate). For a complete discussion on PKs, see the KB article on my web site.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform