We help IT Professionals succeed at work.

Squares in imported data

Ange
Ange asked
on
Medium Priority
386 Views
Last Modified: 2008-03-03
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.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2010
Commented:
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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

Author

Commented:
It just came back to me - query design/SQL view. I've done it, thanks for your help.
Ange
CERTIFIED EXPERT
Top Expert 2010

Commented:
Glad to help, Ange :)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.