Link to home
Start Free TrialLog in
Avatar of Jim Metcalf
Jim MetcalfFlag for United States of America

asked on

Phone number data formatting all over the place in my database

I have a table that has a column for phone numbers.  there are thousands in here and their formatting is not consistent.

ie....
 (999) 999-9999
1111111111
222-222-2222


they are all over the place
I need to update this to one format.     888-888-8888  example

does someone know how to do that?
Thanks a bunch
Avatar of _agx_
_agx_
Flag of United States of America image

Does it contain only US phone numbers or mix of US and international numbers?

Do you need to support international numbers?
SOLUTION
Avatar of Martin Miller
Martin Miller
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jim Metcalf

ASKER

it is only for USA numbers
Great, USA 10 digit numbers only.  The +1 may be optional as an 11th digit. Between the solutions above, do you need any more assistance?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> I'd suggest not storing ANY formatting chars.
I second that.  Like I mentioned earlier, my preference is to do formatting on the front end, or as Scott said when needed.
PerfectoMundo