create function f_split(@sourcesql varchar(8000),@strseprate varchar(10))returns @temp table(a varchar(100))--实现split功能 的函数--date :2005-4-20--author :dominoas begin declare @i int set @sourcesql=rtrim(ltrim(@sourcesql)) set @i=charindex(@strseprate,@sourcesql) while @i>=1 begin insert @temp values(left(@sourcesql,@i-1)) set @sourcesql=substring(@sourcesql,@i+1,len(@sourcesql)[email protected]) set @i=charindex(@strseprate,@sourcesql) end if @sourcesql<>'/' insert @temp values(@sourcesql) return end