Have verified the query in the database the data looks fine and used the same query in the "custom SQL query" section in the Tableau but the apostrophes values in the field is replaced by "?"
Its really strange.
Can you do one thing just create a view of your query which you're using in
custom sql at database level and connect that view in tableau. Just give a
try and let me know if the issue still persist.
No brother, it didn't work. Did a work around, replaced the character by its ASCII code
CAST(REPLACE(COMMENTS, CHR(15712189), '''') AS VARCHAR2(4000)) AS COMMENTS
No, In tableau when I convert CLOB to Varchar2, apostrophe is displaying as '�'.
So have to convert '�' back to apostrophe.
Your query replaces the apostrophe with the empty string which am not supposed to
Try this once more
CAST(REPLACE(COMMENTS, CHR(39), ''') AS VARCHAR2(4000)) AS COMMENTS
else share a sample workbook with dummy data. It'll help us to analyse the issue.