Make sure if you use ALLTRIM (or trim in any fashion actually) that you also pad the expression. Otherwise, FP use the first record it looks at to determine the index tag length, and you can end up cutting off part of what you want. I usually recomment that you use the PADR(ALLTRIM(expression),xx) where xx is the length required to make sure that the longest length you might get in your data will be in the index.
>I read that ALLTRIM on index fields can cause data corruption problems. Is this true? I have ALLTRIMs in many of my applications indexes. And some of the indexes use LTRIM RTRIM to accomplish the same thing. Is this better procedure: INDEX ON LTRIM(RTRIM(CODE_ID))+LTRIM(RTRIM(CODE))TAG ID_CODE
>
>Thanks
>
>Brenda
Cy Welch
Senior Programmer/Analyst
MetSYS Inc