General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only