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!

Replacing special characters

Murray SobolMar 5 2013 — edited Mar 8 2013
I have special characters in a varchar column that I need to remove.
The characters are as follows:
lv_single_quote := CHR(39);
lv_double_quote := CHR(34);
lv_ampersand := CHR(38);
lv_tilde := CHR(126);
lv_percent := CHR(37);
lv_caret := CHR(94);

The data bafore the update statement looks like this:
QUANTITY_ENTRY_NBR LAST_PRODUCT_HAULED
--------------------------------------------------------------------------------
------------------------------
10889 smurf's

I tried to replace the single_quote character with a space using this SQL:
update s1_quantity_entry
set last_product_hauled = REGEXP_REPLACE(last_product_hauled, 'CHR(39)', 'chr(40) ')
where quantity_entry_nbr = 10889;

It shows that one row was updated, but the data appears to be unchanged.

Ideally, I would like the result to look like this:
QUANTITY_ENTRY_NBR LAST_PRODUCT_HAULED
--------------------------------------------------------------------------------
------------------------------
10889 Smurfs

Any assistance would be appreciated.
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2013
Added on Mar 5 2013
6 comments
1,900 views