mercredi 26 mars 2014

SQL - Remove Parenthesis from Phone Number


Vote count:

0




I'm trying to remove parenthesis from the area code of a number. I'm able to do so but when I try to concatenate the two Replace functions, the numbers repeat with only one parenthesis removed.


This is what I have:



SELECT HomePhone, REPLACE(HomePhone, '(', '') + REPLACE(HomePhone, ')', '') AS Expr1 FROM dbo.Employees



http://ift.tt/P1YUCk



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire