Why add padding to the user name var rather than trimming space from both values?LOCATE FOR UserName=PADR(lcUserId, LEN(UserName)) and ...--Harvey