Removing phone formatting in query

  • Hi All, I have a query that I am using and am trying to remove a hyphen from a phone number field.

    Can you show me how to convert a number that is formatted as 123-456-7890 to 1234567890?

    select phone

    from affiliate

    Thank you so much in advance for your help

  • select REPLACE(phone,'-','') as phone_formatted

    from affiliate



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Thank you!!!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply