一,用临时表作为数组 代码如下: create function f_split(c varchar(2000),split varchar(2)) returns t table(col varchar(20)) 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),”)
ASP中Split函数的用法 分割截取字符串看几个例子就能理解了
代码如下:mystr=”1,2,3,4,5″ mystr=split(mystr,”,”) for i=0 to ubound(mystr) response.write mystr(i) next ‘返回值为123456
mystr=”xlei.net/http/student/x/index.asp” mystr=split(mystr,”/http/student”) for i=0 to ubound(mystr) r