Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Replace unwanted chars in data with a space?

Re: Replace unwanted chars in data with a space?

From: don hunt <dohunt_at_hotmail.com>
Date: 24 Jul 2001 16:36:15 -0700
Message-ID: <1b56e975.0107241536.7b99c5f7@posting.google.com>

Bob Maggio <rmaggio_at_courts.state.ny.usNOSPAM> wrote in message news:<3B5DBC05.823F455B_at_courts.state.ny.usNOSPAM>...
> Does anyone have a way of finding an unwanted char (say, a semi colon ;
> )in a varchar2 data field and if it is found, removing it and replacing
> it with a space? Preferabley, I would like to include a series of chars
> to be seached for:
> Something to take this:
> Jordan; Rd.
> and leave
> Jordan Rd.
> These are typos in conversion data that woun't pass our edits. Thanks.
> I've recieved much needed help from this group.
> Bob Maggio

Use the translate function...

examples:
+ select translate('Jordan; Rd.',';',' ') from dual;

+ update some_table
  set    some_field = translate(some_field,';#%.','    ')
  where  some_condition
Received on Tue Jul 24 2001 - 18:36:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US