Is there a more elegant way of doing this. I want to replace repeating blanks with single blanks....
declare @i int set @i=0 while @i <= 20
select string = replace( replace( replace(' select single spaces',' ','<>') ,'><','') ,'<>',' ')
Replace duplicate spaces with a single space in T-SQL