T Sql Clean Phone Number

Posted on
Image Result For T Sql Clean Phone Number

Image Result For T Sql Clean Phone Number

In case you didn t want to create a function, or you needed just a single inline call in T SQL, you could try set @Phone = REPLACE REPLACE REPLACE REPLACE @Phone, , , , , , , , . Of course this is specific to removing phone number formatting, not a generic remove all special characters from . I have a varchar field in SQL Server with phone numbers. There is no set format, some are , some are , some are , and various other iterations. I need a . I have about phone numbers from around the world that I need to clean up before loading into SQL Server. I have gotten to the point where I have removed non numeric characters and other junk data, but now I am somewhat stuck. Some of the numbers that were entered in the US have the country code xx or just xx .I have a category that has users phone numbers as so . I want to run an update query so all those phone number are converted to read . I am new to SQL, like just started today. How do I go about doing this? And, what is a good SQL resource to go to for learning it?.