>I understand it is not a good idea to use ALLT() in an index expression. Why is it not a good idea to use ALLT() in an index expression? I think someone told me that before, but I don't think it ever caused me a problem. I can remove it and see what happens when I do a seek.
It's a potential problem. Example, your table is defined as
f1 C(10), f2 C(3)
. You have the following records:
f1 f2
---------- ---
ABC DE
ABCD E
With an index on f1 + f2, you get:
ABC DE
ABCD E
But with an index on ALLTRIM(f1) + ALLTRIM(f2), you get:
ABCDE
ABCDE
If you then
SEEK(ALLTRIM(f1) + ALLTRIM(f2))
, which one are you going to get? How do you get to the other record?
HTH!
Sylvain Demers