Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    Peoria, AZ
    Posts
    3

    Unanswered: Parsing Varchar2

    I need to parse out some alphabetic characters from a Varchar2 field to leave only the number values. The field values look like this $40-35 or say $40$35.

    Is there a sql function or statement to do this. Any help is greatly appreciated.

    andavian

  2. #2
    Join Date
    Oct 2003
    Location
    St.Louis,MO
    Posts
    120
    the good 'ol select replace should get the job done.
    just write a statement to replace the $ and/or -

  3. #3
    Join Date
    Oct 2003
    Location
    St.Louis,MO
    Posts
    120
    a generic example follows:

    SELECT REPLACE(column_name, 'old_value', 'new_value') FROM table_name

  4. #4
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    given your example of input what would you expect the output to be? select replace could work but it will depend on the complexity of your substitutions.

Posting Permissions

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