martyje
asked on
I am trying to clean some phone number that contain special characters such as ( ) - and any extra spaces in phone number fields.
I am trying to clean some phone number that contain special characters such as ( ) - and any extra spaces in phone number fields. How do I take out just digits from (548) 552-5254.
I am trying to get 5485525224.
Any ideas?
Thanks
I am trying to get 5485525224.
Any ideas?
Thanks
what phone is it?
can you not 'edit' the contact or number?
can you not 'edit' the contact or number?
ASKER
angelll:
Here's the query that I tried. What am I doing wrong here?
SELECT REPLACE( REPLACE( REPLACE( REPLACE( `phone` , ' ', '' ) , '-', '' ) , '(', '' ) , ')', '' )
Thanks.
Here's the query that I tried. What am I doing wrong here?
SELECT REPLACE( REPLACE( REPLACE( REPLACE( `phone` , ' ', '' ) , '-', '' ) , '(', '' ) , ')', '' )
Thanks.
You are missing table name .
SELECT REPLACE(REPLACE(REPLACE(REPLACE(`phone` ,' ','' ) ,'-',''),'(','' ),')','') FROM tablename;
It seems `phone` is a column name..
ASKER
Sorry, should have asked the question differently. I want to update that change in the database permanently. All the phone numbers that I have in `phone` column, I want to take out all the special characters and spaces.
Thanks.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks much
Open in new window