Replace wildcards with a space

B

Barbara

I have a text field with all values containing an asterisk. The asterisk can
be located anywhere within the contents. I am trying to replace the asterisk
with a space. I will then use TRIM to remove any spaces at the beginning of
the text.

I have been unable to get an update query to work. When my criteria is like
"~[*}", Access says that 0 rows will be updated. When the criteria is [*],
I am asked to enter a parameter value.

Any assistance will be greatly appreciated.

Thanks - bkh
 
M

Marshall Barton

Barbara said:
I have a text field with all values containing an asterisk. The asterisk can
be located anywhere within the contents. I am trying to replace the asterisk
with a space. I will then use TRIM to remove any spaces at the beginning of
the text.

I have been unable to get an update query to work. When my criteria is like
"~[*}", Access says that 0 rows will be updated. When the criteria is [*],
I am asked to enter a parameter value.

UPDATE table
SET field = Trim(Replace(field, "*", " "))
WHERE field Like "*[*]*"
 

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