Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Text in Make Table Query

Status
Not open for further replies.

KristenCarr

Programmer
Oct 31, 2001
11
US
I'm working with a Sybase table (through Access) which stores phone numbers as Text(25) formated as (XXX)XXX-XXXX. I need to change this to be XXX-XXX-XXXX for an export to another db. Formatting won't work since it won't know what to drop, I figure I should parse it but don't know how to do that in Access.

Any suggestions?
 
1. Create another field in your Table (assuming you need to keep a copy of the data in it`s original format, if not just update the live data).

2. Create an Update Query on the Table you are using and update the Phone Number field to :-

Mid([TELNO],2,3) & "-" & Right([TELNO],8)

This would convert e.g. (020)123-4567 to 020-123-4567

Hope this helps.
itsmarkdavies@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top