Clean data

M

Maurice

How do I construct a query that will remove excess spaces between
concatenated text in access. I concatenated a last name and first name
records into User Name, but they have joined with significant space in
between.
 
Ö

Ömer Ayzan

Use Ltrim, Rtrim or just Trim function before concatenation. Like UserName:
Trim(First) & Trim(Last)
Ömer Ayzan
 
J

John Vinson

How do I construct a query that will remove excess spaces between
concatenated text in access. I concatenated a last name and first name
records into User Name, but they have joined with significant space in
between.

That's odd! Access normally trims trailing blanks. How are you doing
the concatenation? Is the data stored in Access, or in some other
software (which might not trim)?

Just FWIW, if you have fields FirstName and LastName you can use

UserName: [FirstName] & " " & [LastName]

If that doesn't work you can try

UserName: Trim([FirstName]) & " " & Trim([LastName])

John W. Vinson[MVP]
 
Top