Discussion Locked

Remove spaces from a string

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'd like to remove all of the spaces from every string value contained in a particular column of an Access 97 table. I'd like something a little easier than looping through a DAO recordset, but that will do if someone can help me with the code as I'm a bit rusty. Thanks!

4 replies

by sjohnson175

I can't remember if Access supports all of ANSI SQL but:

UPDATE table SET column = REPLACE(column, " ", "")

by sjohnson175

Oops! should be using single quotes, not double. Sorry.

UPDATE table SET column = REPLACE(column, ' ', '')

This discussion is closed to new replies.