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 -> Re: Trimming blanks from VARCHAR2 columns

Re: Trimming blanks from VARCHAR2 columns

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 22 Nov 1998 00:03:58 GMT
Message-ID: <3657223d.1945041@netnews.worldnet.att.net>


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

Original text of this message

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