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: Izabella <Izabella.Urbanek_at_afp.gov.au>
Date: Tue, 24 Nov 1998 12:07:57 +1100
Message-ID: <73d14d$rb5$1@platinum.sge.net>


You could set autocommit to 100, 1000 or whatever and your large update statement will commit every 100 or 1000 or whatever rows so that you won't run out of rollback segments.

:-)

Mac Lazarus wrote in message <01be14d0$a131c860$70005e94_at_usplwxzh0h001>...
>The data in the varchar2 columns of a specific table has leading and
>trailing spaces. I have thought about running the following update
>statement:
>
>update table1
>set col1 = ltrim(rtrim(col1);
>
>If table1 is large, this would require a lot of rollback space. The key to
>the table is system generated(even though the key is varchar2 also), so I
>do not know how to programmatically divide several update statements evenly
>, i.e. have several update statements of the form
>
>update table1
>set col1 = ltrim(rtrim(col1)
>where key between 'xxx'and 'yyy'
>
>Does anyone have any ideas on how to code this?
>
>TIA,
>
>Mac
>
>
Received on Mon Nov 23 1998 - 19:07:57 CST

Original text of this message

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