Re: update command

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 17 Nov 1999 08:35:21 -0500
Message-ID: <964yOBrndqd6SySgCPpIa8NCMQ72_at_4ax.com>


A copy of this was sent to "mh579" <mh579_at_bluecarrots.com> (if that email address didn't require changing) On Tue, 16 Nov 1999 22:11:04 -0000, you wrote:

>Due to a slight error on my part, users of our database have been allowed to
>enter text into a field in a format which contains spaces. This however is
>now causing problems with reports.
>
>the solution is to amend each row in the table concern to update the space
>to a _ or /. I can do the update sql using a known input ie gse 123 and then
>update to gse_123 or gse/123 but I would like to update all errors with one
>sql command. I have tried selecting the rows with the incorrect format and
>then updating them but to no avail!!!
>
>could anyone please help
>
>Martin Hopkins
>

update T set c = replace( c, ' ', '_' );

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Wed Nov 17 1999 - 14:35:21 CET

Original text of this message