Sergiy (8/24/2016)
There was an article from Jeff Moden how to replace any number of consecutive spaces with a single one without recurring REPLACE calls.I don't have it handy, but it goes like this:
DECLARE @ReplaceChar NCHAR(1)
SET @ReplaceChar = CHAR(7) -- any character you sure is not mentioned anywhere in the strings
SELECT s.Sometext, REPLACE(REPLACE(REPLACE(s.Sometext, ' ', ' ' + @ReplaceChar), @ReplaceChar + ' ', ''), @ReplaceChar, '')
FROM #Sample s
The code that I included is from the discussion from that article. It's mentioned to be the fastest method proposed.