function Split(szFullString, szSeparator) local nFindStartIndex = local nSplitIndex = local nSplitArray = {} while true do local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitInd…
declare @str varchar(100),@sql varchar(1000)set @str='1,2,3,4,5,6,7,8,9,10'set @sql='select Value='''+ replace(@str,',',''' union all select ''')+''''PRINT @sqlexec (@sql) if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[f_spli…
非常非常常用的一个函数Split字符串分割函数. Dim myTest myTest = "aaa/bbb/ccc/ddd/eee/fff/ggg" Dim arrTest arrTest = Split(myTest , , ) Dim i For i = to ubound(arrTest) print "arrTest(" & i & ") = " & arrTest(i) Next 打印结果为: arrTest(0…