Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Replace part of a text string using sql
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