Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to trim data in existing table

AvaDec 18 2009 — edited Dec 21 2009
Hi All,

We have one table in that have records more than 2653147 records,

Now i would like to trim spaces in column in some columns the data type is VARCHAR2 it contains all spaces.

Now i want to trim and store it as zero.

Iam trying in following method but it is taking long time running more than 1 hour.

UPDATE FPRDTA_F6411
SET SADCTO = TRIM(SADCTO)
WHERE LENGTH(SADCTO)>LENGTH(TRIM(SADCTO))

Kindly advice is the above one is correct?

Thanks in Advance,
Ava
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2010
Added on Dec 18 2009
7 comments
1,516 views