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:28:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01209419
Message ID:
01209444
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?
>>>
>>>Rushmore doesn't use indexes with For clause.
>>
>>Not 100% correct according to http://www.code-magazine.com/article.aspx?quickid=0404022&page=3 This has to be re-checked carefully and I was searching information in the meantime, but now have to stop my search due to some pressing problems....
>
>Ok, due to other pressing problems I disappear now, so I will look tomorrow what you find.

I thought I already delegated this task to Dmitry <g>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform