Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexes setup wrong - I think
Message
From
03/11/2005 11:29:37
 
 
To
03/11/2005 10:53:24
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01064984
Message ID:
01065012
Views:
13
This message has been marked as the solution to the initial question of the thread.
>Hi All,
>
> We are finally moving up to VFP8 (After our next release, VFP9). I am working with one table at the moment that has a lot of indexes. And I remember seeing here that you should not use alltrims in indexes. I have the following index, which is the longest and worst, that I should probibily fix:
>
>
>  alltrim(reportedby)+alltrim(takenby)+alltrim(testedby)+alltrim(progname)+ ;
>    alltrim(catg_1)+ alltrim(catg_2)+ alltrim(catg_3)+ alltrim(catg_4)+alltrim(str(priority))
>
>
>I think I can just either do a Padr() leave them alone for the fields that are characters already, but the last field (priority) is a numeric and I have it in about 10 other indexes floating around, not always at the end of the index.
> My question on that is do I do a padl() or a padr() on it?
>
>Thanks.
>Beth

Beth,

For the char fields, a padr() may not be necessary, unless you want only a part of the char field, ie left(...)

For numerics, you want to padl(field, len, '0') to keep the numeric sequence
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform