Wednesday, June 21, 2017

What if REPLACE function is not working on sql table column

160 is Unicode NO-BREAK SPACE so that's what you need to replace:


replace(UserName, char(160), '')
,LTRIM(RTRIM((ISNULL(REPLACE(REPLACE(REPLACE(City,CHAR(9),''),CHAR(10),''),CHAR(13),''),'')))) AS City