Avatar of Aleks
Flag for United States of America

asked on 

remove parenthesis, spaces and dashes

I have a phone number inside a field called 'phone'
I need to remove all formatting (parenthesis, dashes, spaces) and leave the numbers only.

I have the sql below but it only removes dashes, can I get help to remove everything but digits ?   or to additionally remove parenthesis open and close and spaces ?

Replace(PobCountry,'-','') AS phoneclear
Web DevelopmentMicrosoft SQL Server 2008SQL

Avatar of undefined
Last Comment

8/22/2022 - Mon