DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: SQL query question about removing characters?

  1. #1
    Join Date
    Mar 2009
    Posts
    1

    SQL query question about removing characters?

    Hello,

    is there a way to write a sql query that will extract "-" dashes from a field? for instance the field contains 111-111-111, i want to get 111111111 as the result of my select statement, THanks.


    ___________________

    edit: no commercial links permitted on the forum

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    That isn't so hard.

    Code:
    SQL> select replace('999-99-9999', '-', '') from dual;
    
    REPLACE('
    ---------
    999999999

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width