>So, is it a bug in VFP8 that is now corrected in VFP9?
Yes.
>I had thought that I could use "COUNT FOR ..." or "SELECT .. FROM ...", and get the same result.
I think I answerd that in my prevoous post
> In order to move to VFP9 and not break my app would you suggest I SET ANSI ON?
It may help in this case but it can also change result of some other queries.
I don't recomend to use ALLTRIM() in queries in general and in WHERE clause in particular w/o understanding all the consequences.
--sb--