Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Translate with Update
update myTable
set col_name = TRANSLATE(col_name, '/-', '__');
ta-dum!
In article <jKuM6.1132$XE.555120700_at_twister1.starband.net>, Sonja Barton
<sbarton_at_starband.net> writes:
>Hi,
>
>I have several records in a db that contain illegal characters.
>SELECT TRANSLATE(col_name, '/-', '_') from myTable;
>
>does appear to replace all the "/" and "-" with "_".
>
>But, when I perform a select * from myTable, all the illegal chars are
>still there.
>
>So, I'm thinking I need to combine the translate with an update, but can't
>figure out the syntax.
>
>Help is appreciated!
>
>Thanks,
>
>Sonja
>
>
>