Clean data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Use Ltrim, Rtrim or just Trim function before concatenation. Like UserName:
Trim(First) & Trim(Last)
Ömer Ayzan
 
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]
 
Back
Top