SQL to update characters in table column
Posted on 2016-11-27
I am using SQL 2008R2. I have a table named 'AdminChecklist', The column 'Docname' is an nvarchar column.
It has values that may include characters such as ' or " or & or \ I need to go over every row of that column and replace those characters as listed below:
Replace: & FOR &
Replace: ' FOR '
Replace: \ for "
Replace: " FOR &apos;
I am not 100% sure those are the unicode values I should use to replace especially ' and " in the string. This way they should be displayed properly in the ASP page, currently the code gets broken by ' and "
Help is appreciated.