Home Forums SQL Server 7,2000 T-SQL Finding & removing a space from a string RE: Finding & removing a space from a string
Calvin Lawson
SSChampion
Points: 11030
More actions
August 21, 2003 at 2:52 pm
#470862
That's to complicated. This works beautifuly.
declare @String varchar(255)
set @String = 'Have a nice day'
While 1 = 1
begin
set @String = replace(@String, ' ', '')
IF charindex(' ', @String) = 0 Break
end
select @String
Signature is NULL