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!

Field Substring Character Removal 1

Status
Not open for further replies.

Omnillas

Programmer
May 4, 2004
29
US
I have taken over a database that has some not-so-normalized data in a field that contains phone numbers.

Some fields are all numeric and some have the dashes. What's a good method for removing the dash character? I have looked at a couple substring functions but I need something tiny and efficient. Anyone have a good suggestion for an effective and efficient removal of substring characters?
 
Replace(strText, "-", "")

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Do you want to remove the dashes and leave the space or do you want to modify the value so that it is a continuous string of numbers with no spaces?
 
I would like to eliminate the dash and replace with nothing in effect closing the resulting string up.

Looking for a good update query method to performing the adjustments.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top