Home Forums SQL Server 7,2000 T-SQL Finding & removing a space from a string RE: Finding & removing a space from a string

  • 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