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…
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…