To convert NON ASCII Characters to ASCII I used the below query
UPDATE tablename
SET columnToCheck = CONVERT(columnToCheck USING ASCII)
WHERE columnToCheck <> CONVERT(columnToCheck USING ASCII)
It replaces the NON ASCII characters into replacement characters. But is it possible to replace those Non Ascii characters to SPACES.
I tried some options, but its not working. Any suggestion.
Try this one
UPDATE tablename
SET columnToCheck = REPLACE(CONVERT(columnToCheck USING ascii), '?', '')
WHERE ...
or
update tablename
set columnToCheck = replace(columnToCheck , char(146), '');
Reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With