Link to home
Start Free TrialLog in
Avatar of cat4larry
cat4larry

asked on

Remove - from phone number

How can I write and update query to remove the dashes from my table.  I have 2 phone number fields that look like this 555-555-5555 I want to remove the dashes.

Thanks
Avatar of trouta
trouta

update person set phone_number = replace(phone_number, '-', '')

if you are running SQL 7.0 or 2000
Avatar of cat4larry

ASKER

Trouta thanks you answered the question one last thing what if the phone number is formated like this (555)-555-5555 how can i remove the () and -'s  thanks very much
ASKER CERTIFIED SOLUTION
Avatar of trouta
trouta

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