Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement