Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Replace unwanted chars in data with a space?
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_conditionReceived on Tue Jul 24 2001 - 18:36:15 CDT
![]() |
![]() |