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 find and remove non-alphanumeric character from a column

user8525647Jan 25 2018 — edited Jan 26 2018

Hi

We have a big table (900M rows), In this table for around 50K rows,the column (col) has got non-alphanumeric characters which shouldn't be as there was no validation at the app side.

How could we strip out these non-alphanumeric characters so that only alphanumeric remains. I am using below sql but it is taking a lot of time

update data_table

set    col = regexp_replace(broker_complex_trade_id, '[^A-Z0-9 ]', '')

where  regexp_like(col, '[^A-Z0-9 ]')

The table is non partitioned and composite index on other 4 columns. The column which needs to be updated is not indexed.

Thanks

This post has been answered by Paulzip on Jan 25 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2018
Added on Jan 25 2018
11 comments
36,618 views