Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a unique index tag unless empty?
Message
 
 
To
28/03/2007 16:19:12
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01209419
Message ID:
01209437
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>>>>>>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....
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform