Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: sql help needed
>Ok, now the problem. I have to replace any character occurence on character
>fields. I cannot find an SQL commands to do that. UPDATE, as far as I have
>understood, does replace the whole field , but is there any way of
>replacing a character and not the field?
>Example: In the field I have the following string:
> gianmarco,paris
>I'd like it to become:
> gianmarco_paris
If you want to replace all occurences of one character in a text-field
use the following statement:
UPDATE <table>
SET field = REPLACE(field, '.', '_');
Regards
Jens
Jens Backmeier |s |d &|m | software design & management Jens.Backmeier_at_sdm.de | | | | GmbH & Co. KG Tel.: (040) 254491-22 | | | | Luebecker Str. 1 Fax.: (040) 254491-11 | | | | D-22087 HamburgReceived on Thu Feb 05 1998 - 00:00:00 CST