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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing Delimiters 1

Status
Not open for further replies.

bombplayer

Programmer
Jul 3, 2001
47
0
0
US
I have a database that I need to retrieve telephone numbers out of. The problem lies that I need these numbers with no delimiters ('-','(',etc). How can I do this?
 
And this fields are never the same where one data record could be (555) 555-5555 the next could be 555-555-5555
 
Try this:

select replace(replace(ltrim(replace(replace(telephone,' ',''),'(','')),')',''),'-','') from table


Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top