Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2007

    Unanswered: Remove character in a cell

    I need to remove a character in a cell.

    The character is a: -

    I can do an update of the table however there are more then 4000 records that contain the -. All of these records need to be modified and the - need to be removed. The character is not always in the same place. I tried doing a replace but that only works for one cell not for all of them.

    The content looks like this.

    0123-567890 but again the - can also be on a diffrent location. I tried to use translate, replace and update but I wasn't able to get it working.

    The table name is customer colum name is telephone number.

  2. #2
    Join Date
    Jun 2004
    Liverpool, NY USA
    update my_table
    set my_column = replace(my_column,'-');
    where instr(my_column) > 0;

    will replace all occurances of hyphen in the column.
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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