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

Home -> Community -> Usenet -> c.d.o.misc -> Replace part of a text string using sql

Replace part of a text string using sql

From: John Guthrie <john_at_guthrie.co.za>
Date: Fri, 29 Nov 2002 11:13:06 -0000
Message-ID: <as7i01$ojasr$1@ID-156817.news.dfncis.de>


Hi All,

I am trying to update part of a text string in a Varchar2 Column.

replace:
somebody_at_domainname.com
with
somebody_at_domainname.co.uk'

I tried using the following sql:

update user set email = replace ('domainname.com', 'com', 'co.uk') where username like 'J%';

This produced the following result, it chopped of the "somebody" part: domainname.co.uk

instead of returning
somebody_at_domainname.co.uk

Any ideas?
Thanks for the help!

Regards,
John Guthrie Received on Fri Nov 29 2002 - 05:13:06 CST

Original text of this message

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