Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trimming blanks from VARCHAR2 columns
On 20 Nov 1998 21:53:33 GMT, "Mac Lazarus"
<mac.lazarus_at_eds.com> wrote:
>update table1
>set col1 = ltrim(rtrim(col1);
You could try something like:
update table1
set col1 = ltrim(rtrim(col1)
where col1 <> ltrim(rtrim(col1))
or ( (col1 is not null) and (ltrim(rtrim(col1)) is null) )
and rownum < 10000;
Keep executing the above, committing each time, until no rows are found.
Jonathan Received on Sat Nov 21 1998 - 18:03:58 CST