Update telephone numbers

G

Guest

I have a database in which due to past entries, some phone numbers include
the formatting, i.e. (555) 123-4567 and others used an input mask and simply
have the digits, i.e. 5551234567.

I would like to do an update query that changes only those numbers with the
formatting included to remove the parenthesis, hyphens, and spaces and just
leave the 10 digits.

Can anybody suggest how to do this in terms of what to enter for the
"criteria" line and what to enter for the "update to" line?

Thanks,

Steve Sherman
 
G

Guest

First back up your data.

You can try an update query, using the replace function

UPDATE TableName SET TableName.FieldName=
Replace(Replace(Replace(Replace([FieldName]," ",""),"(",""),")",""),"-","")
 

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