Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2006

Tip: Looking for answers? Try searching our database.

Update telephone numbers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve in S.F. - 09 May 2006 20:44 GMT
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
Ofer Cohen - 09 May 2006 21:02 GMT
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]," ",""),"(",""),")",""),"-","")

Signature

Good Luck
BS"D

> 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
[quoted text clipped - 10 lines]
>
> Steve Sherman
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.