I have a field in a table that I found has hidden/invisible \ at the end of each value. This is causing issues in another process that requires the data to be moved over to a Redshift database. The hidden backslashes is causing the data to error in th load. So I'm trying to use the replace function to get rid of them but every combination I try doesn't work.
I have tried the following so far:
UPDATE table SET field = REPLACE(field,'\\','');
UPDATE table SET field = REPLACE(field,'\\\\','');
UPDATE table SET field = REPLACE(field,'\\\\\\','');
The 2nd and 3rd tries were to see if I just needed to escape the backslashes. However, none of them removed the characters as the load still fails due to the backslashes.
I've also tried using char(92) instead of the actual backslash with no luck.I'm not sure what I'm doing wrong at this point.