I have special chars in my sql tables and want to remove the special chars.
I have a function that strips out all chars that breaks XML.
fn_RemoveBadXMLChars(data)
which does something like this:
REPLACE(@ResultVar,'ÿ','')
Is there any easier way to remove every special chars instead of have 100 replace statments?
You can create a filter table that contains a record for each of the values you want to replace, like this:
And then use a variable to replace against your filter table like this: