--将字符串S按照“;”拆串入库到临时表 #temp
declare @s varchar(4000)
set @s='-1;-1;0;0;0;'
select top 8000 id=identity(int,1,1) into # from syscolumns a, syscolumns b
select * into #temp from
(
select substring(@s,id,charindex(';',@s+';',id)-id) as temp
from #
where substring(';'+@s,id,1)=';'
and id<len(@s)
) as a
drop table #
drop table #temp