>Hi All:
>
>If I have an index on some field and the expression I'm searching for using SEEK() has leading or trailing blanks, I don't get a match. If I try an alltrim on the search expression and the index key, I still don't get a match. I appears that TRIM commands are ignored in index expressions.
>
You'd need to create an index based on the trimmed expression, and there are some problems doing that as well (VFP index expressions need to be fixed length, so you'd need to build an expression on PADR(ALLTRIM(
char expression),
fixed expression length) to ensure that VFP built the index properly (lots of funny things can happen if you create an index expression initially and the size of some key value added later exceeds the max length from index creation.)
You can build an index one way, and then later selectively apply an expresion to the implemented index.