>Hi Len
>I tried and got the same (unexpected!) results.
>I don't have a clear explanation, but removing TRIM I got the "expected" results, which may point to how SQL handles the length of the strings in the result data set?
I found that too, but unfortunately I need the trim, without it ABCD doesnt equal ABC, because of the space padding.
It concerns me that Vfp cannot cope with such a trivial query, and MS do not (or at least didn't 5 years ago) treat it as a problem. If it can demonstrably return incorrect results from a result set totalling 4, then how can it be trusted on a large dataset, other than by using very simple queries.
Thanks at least for confirming that it's not something I am doing wrong.
Len Speed