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

Home -> Community -> Usenet -> c.d.o.tools -> Re: sql help needed

Re: sql help needed

From: Jens Backmeier <backmeie_at_hh.sdm.de>
Date: 1998/02/05
Message-ID: <6bc4em$gtj$1@bsdti6.sdm.de>#1/1

>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 Hamburg
Received on Thu Feb 05 1998 - 00:00:00 CST

Original text of this message

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