How do I modify text with a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that has a text fied with numbes such as 123-45-6789 I
want to remove the dashes with an update query. How do I do this

Thanks
Tim
 
Jeff L said:
Easier way:
Select YourFieldName
Where YourFieldName Like "*-*"

Run the query and do a search and replace.

I have tried both of these and can't seem to get it to work.

I tried Replace([YourTextField],"-","") in an Update Query and it deleted
everything

The I tried the Find & Replace dialogue box with Find "*-*" and Replace with
"**" this gave me ** in every record

Did I do something wrong?
 
Yes. I said run the query, THEN do the search and replace. Search for
- and leave the replace field blank.

Tim said:
Jeff L said:
Easier way:
Select YourFieldName
Where YourFieldName Like "*-*"

Run the query and do a search and replace.

I have tried both of these and can't seem to get it to work.

I tried Replace([YourTextField],"-","") in an Update Query and it deleted
everything

The I tried the Find & Replace dialogue box with Find "*-*" and Replace with
"**" this gave me ** in every record

Did I do something wrong?
 
Jeff L said:
Yes. I said run the query, THEN do the search and replace. Search for
- and leave the replace field blank.

Tim said:
Jeff L said:
Easier way:
Select YourFieldName
From YourTableName
Where YourFieldName Like "*-*"

Run the query and do a search and replace.

I have tried both of these and can't seem to get it to work.

I tried Replace([YourTextField],"-","") in an Update Query and it deleted
everything

The I tried the Find & Replace dialogue box with Find "*-*" and Replace with
"**" this gave me ** in every record

Did I do something wrong?
Tim c wrote:
I have a database that has a text fied with numbes such as 123-45-6789 I
want to remove the dashes with an update query. How do I do this

Thanks
Tim

GOT IT, THANKS FOR YOUR HELP
 

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

Back
Top