In addition I usually find it safest to do it as PADR(TRIM(lastname)+","+firstname,xx) where xx is the longest value I expect to be able to get. Otherwise sometimes you can get truncated keys.
>Hi Dore.
>
>>Wouldn't trimming and concatentation in this way lead to potential errors.
>
>I only use this type of construct under very special circumstances, such as concatenating trim(LASTNAME) + "," + FIRSTNAME or trim(FIRSTNAME) + " " + LASTNAME.
>
>Doug
Cy Welch
Senior Programmer/Analyst
MetSYS Inc