>Cindy,
>
>Slight correction on your description of VFP and Trim in indexes. It does not ignore Trim functions in indexes. It pads the end result so all key values are a fixed length.
>
>That's what causes ted dyster and teddy ster to both be returned in searches.
The remaining problem is - how do we know to which length does it pad them? In SQL selects, it determines the length of calculated fields based on the result in the first row. Now what does it do when creating an index? Maybe a situation like this would be a way to understand how does it decide on the length. We could build two identical tables with a long string expression, and then set them into relation just like in the original problem, indexing on trim(field). It'd be interesting to see what gives.