• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

Squares in imported data

I've imported data from an Excel spreadsheet. A lot of text fields contain little squares, which I think means there were carriage returns in the original data. I don't want the squares. I think I need an update query to run through the table and either delete them or replace with a space. Any ideas? Thanks.
0
Ange
Asked:
Ange
  • 2
  • 2
1 Solution
 
Patrick MatthewsCommented:
Hi Ange,

Try this:

UPDATE YourTable
SET YourField = Replace(Replace(Replace([YourField], Chr(10), " "), Chr(13), " "), "  ", " ")

That will replace the carriage returns and line feeds with spaces, as well as try to clean up any "double spaces"
there may be.

Regards,

Patrick
0
 
AngeAuthor Commented:
Patrick
I'm not a programmer  - I know how to put an update query together in design view, but I don't know how to apply your code to my table. Please advise.
Thanks
Ange
0
 
AngeAuthor Commented:
It just came back to me - query design/SQL view. I've done it, thanks for your help.
Ange
0
 
Patrick MatthewsCommented:
Glad to help, Ange :)
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now