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!

replace non-ascii characters in a field for a select statement

Gib2008Jul 12 2008 — edited Jul 15 2008
Hi all,

Im doing a select statement and pulling 1 column from table A. Some of the records column 1 values have non-ascii characters in them but we need to select and filter them out for passing onto another system.

This works fine when you know what value you want to search and destroy on:
SELECT ATC.VALUE, REPLACE(ATC.VALUE, '') FROM AUDIT_TAB_COLUMNS ATC;

What I need to to is to be able to say "all non-ascii values" instead of specifying just the empty square character. I tried using a regular expression range but it takes the hex values as character values instead of hex values to search on:

SELECT ATC.VALUE, REPLACE(ATC.VALUE, '[^\x00-\x7FFROM AUDIT_TAB_COLUMNS ATC;

How do I do this in a sql select statement with oracle?

Thanks!
Dave
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2008
Added on Jul 12 2008
6 comments
19,075 views