>>Hi Walter,
>>
>>yes, but it your case, why? INDEX ON FirstName-LastName gives EXACTLY the same result! One of the little used features of xBase.
>
>This is not true:
>
>FirstName-LastName
>is
>PADR(RTRIM(FirstName)+LastName,FSIZE(FirstName)+FSIZE(LastName))
>
>
>>
>>OK, I admit I should have use the word "as", and not "in". 'Never use alltrim
as an index expression. Thank you for the correction.
>>
>>>Hi Tore,
>
>Then:
>
>Never use LTRIM()
Correct
>Never use RTRIM()
Correct
>and then
>NEVER USE OF A VARCHAR FIELD ON VFP9 !
Wrong. A varchar field has a maximum length which will be the key length
>
>The issue appear when you use this into a primary/candidate index,
>and this is true for cExp1-cExp2 also.
>
>For a search text index, ALLTRIM(),LTRIM()... can to be used without problems.
If you like to live dangerously, yes. VFP will calculate the index key length by evaluating the index expression on the first record. So, if the first records gives a key length of 0, your index will be of no value.
>
>Fabio