Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create a unique index tag unless empty?
Message
 
 
À
28/03/2007 16:15:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01209419
Message ID:
01209429
Vues:
16
>>>>Is it possible to create an index tag on a field that would enforce unique entry in the field, unless the entry is blank (no entry)?
>>>
>>>You can have a candidate index On myfield with NOT EMPTY(myfield) in For clause.
>>
>>Thank you very much. By the way, I did try it before I posted the question but I missed entering the field name in the EMPTY() expression.
>
>You welcome. Make sure you don't have NULL values in the field.

I won't have NULL values but what got me a little concerned is what Borislav said about optimization. I am thinking that maybe I should have another index tag on this field, just for optimizing queries. Does it make sense?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform