>>We may put this as a rule. I've found a workaround to achieve the listing by AllTrim(first)+' '+AllTrim(second):
>>
>>index on first - (' '+second) tag whatever
>
>I think this tag would give incorrect results if either the first or last name contained spaces. For example:
>
> Van, Jim
> Van Deusen, Jim
>
>would sort as
>
> VAN DEUSEN JIM
> VAN JIM
>
>However, perhaps using a different delimiter than a space would work. I wouldn't bother, if the value is going to get padded out to the full lengths of the constituent fields anyway.
I've overseen this because we simply don't have spaces in names; even my wife, having two family names, writes them with a dash between. You're right, could be better with
index on first - (', '+second) tag whatever
But this would sort them just the opposite. Maybe
index on chrtran(first - (', '+second), ",", chr(4)) tag whatever
This should put the shorter names before the longer ones, but it would slow things down - as any other attempt of trimming would. Anyway, if it's just for sorting purposes,
index on first +second tag whatever
would simply be the best. For display purposes, then, we could combine them like in previous attempts.