ALTER function [dbo].[f_split](@c varchar(2000),@split varchar(2))
returns @t table(col varchar(20),id int identity)
as
begin
while(charindex(@split,@c)<>0)
begin
insert @t(col) values (substring(@c,1,charindex(@split,@c)-1))
set @c = stuff(@c,1,charindex(@split,@c),”)
end
insert @t(col) values (@c)
return
end
select @us1=col from f_split(‘288810/555555/9999/66666/2222/1141/589/111111′,’/’) where id=1