select top 8000 id=identity(int) into # from syscolumns a,syscolumns b select 字段一=substring(a.字段一,b.id,charindex(',',a.字段一+',',b.id)-b.id+1),a.日期 from tb a,# b where substring(','+a.字段一,b.id,1)=',' and len(a.字段一)>=b.id drop table # go
联合查询

select top 8000 id=identity(int) into # from syscolumns a,syscolumns b select 字段一=substring(a.字段一,b.id,charindex(',',a.字段一+',',b.id)-b.id+1),a.日期 from tb a,# b where substring(','+a.字段一,b.id,1)=',' and len(a.字段一)>=b.id drop table # go