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

Trimming blanks from VARCHAR2 columns

From: Mac Lazarus <mac.lazarus_at_eds.com>
Date: 20 Nov 1998 21:53:33 GMT
Message-ID: <01be14d0$a131c860$70005e94@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 Fri Nov 20 1998 - 15:53:33 CST

Original text of this message

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