1 2 3 4 5 6
1 2 3 4 5 6
replace calls, which replaced some of the spaces with a ^ and eventually replaced the ^ with an empty string.
while charindex(' ', @string) > 0
begin
set @string = replace(@string, ' ', ' ')
end
replace method was pretty clever (and maybe faster?). I swear I saw it on AskMe, but I can't find it and my Google searches fail. Anyone know what I'm talking about, or know of a faster, better, cheaper method? Thanks!
You are not logged in, either login or create an account to post comments
posted by jepler at 9:27 AM on December 17, 2008