寫過程時碰到這麼一個問題
而SQL Sever又不支持數組參數
(
ss varchar(
)
declare @str varchar(
declare @result varchar(
set @str=
set @result =
exec(@result)
select * from #temp
(
ss varchar(
)
declare @str varchar(
declare @curr int
declare @prev int
set @str=
set @curr=
set @prev=
while @prev < len(@str)
begin
set @curr=charindex(
if @curr>@prev
insert #temp select substring(@str
else
begin
insert #temp select substring(@str
break
end
set @prev=@curr+
end
select * from #temp
From:http://tw.wingwit.com/Article/program/SQLServer/201311/22436.html