Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trimming blanks from VARCHAR2 columns
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