Find + delete from text field

W

walter

I have a table I would like to change the values of the
primary key.

This currently contains entries such as "China ", where
the spaces are note desirable.

How can spaces be removed from values in a field of type
text?

In this case the result would turn the above into "China".

N.B. I am sure that doing this will still maintain unique
values for the primary key.

Regards,

Walter
 
J

John Vinson

I have a table I would like to change the values of the
primary key.

This currently contains entries such as "China ", where
the spaces are note desirable.

How can spaces be removed from values in a field of type
text?

Run an Update query updating the field to

Trim([fieldname])

If there are other tables linked by this field, you will need to set
Cascade Updates on all the table relationships to update "China " to
"China" in the linked tables as well.
 

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

Top