I want to do string replace in some data in pgsql database column. I tried
CASE
WHEN (po.siteid IS NOT NULL) THEN replace('po.html_content', 'abcd', 'xxx')
ELSE pc.html_content
END
I want to replace string in po.html_content column. But above code is not working. Query get the data in po.html_content column without replacing.
Is my code is wrong or any idea...
SELECT po.html_content, replace(po.html_content, 'abcd', 'xxx') FROM poshowing some of the rows where it hasn't been replaced.