Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding an index
Message
From
23/02/2003 09:07:57
 
 
To
22/02/2003 23:12:30
Jordan Pastourel
Worksafe Management Systems
Toowong, Australia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00756676
Message ID:
00756729
Views:
9
Apart from the error (answered by sb), INDEX ON ALLTRIM() has this effect:

Data:

" ABC "
"DEF "
" GHI"

Index:

"ABC "
"DEF "
"GHI "

It does not save you any space in the index file - it simply takes any space at the beginning of the expression and moves it to the end.

It might be a cleaner approach to put this in the Valid() of the control where you input CINS_ClaimNum:

This.Value=ALLTRIM(This.Value

If you actually want the data to be upper case, just put a "!" in the Format of that control. Then your index is just on the field - more straightforward. If you want optimization on your queries and you use the current command, you would have to say "LOCATE FOR UPPER(ALLTRIM(CINS_ClaimNum))=..." If you just say "LOCATE FOR CINS_ClaimNum=..." it won't get optimized, unless your index tag matches the FOR expression exactly.

Also, if you're not using non-structural indexes (non-CDX), and you indicate that you are not, then the "ADDITIVE" keyword isn't doing anything.
Previous
Reply
Map
View

Click here to load this message in the networking platform