Replacing special characters
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