SQL

  • I have data that is in a string format of

    '(123) 456-7890' and need to extract the numbers only.

    '1234567890' any advice?

  • if it's just the parenthisis, space and hypen that your wanting to remove, then ....

    SELECT

    REPLACE(

    REPLACE(

    REPLACE(

    REPLACE(yourField

    , '(', '')

    , ')','')

    , '-', '')

    , ' ', ''))

    FROM

    dbo.yourTable

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • Thank you

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

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