What is the best way to remove all spaces from a string in SQL Server 2008?
LTRIM(RTRIM(\' a b \')) would remove all spaces at the right and left of th
LTRIM(RTRIM(\' a b \'))
Just a tip, in case you are having trouble with the replace function, you might have the datatype set to nchar (in which case it is a fixed length and it will not work).