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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top