现在,我改到这样
--生成带行号的数据临时表#temptable
SELECT no = IDENTITY (int, 1, 1), *
NTO #temptable
FROM clientsect where sectstate = 'hold'
--下面的是得到第一列数,第二列数据,现在问题是不知道怎么合,搞不好就是笛卡乐积
select clientid from #temptable where no%7=1
select clientid from #temptable where no%7=2
select clientid from #temptable where no%7=3
select clientid from #temptable where no%7=4
select clientid from #temptable where no%7=5
select clientid from #temptable where no%7=6
select clientid from #temptable where no%7=7
请大家帮我一下,谢谢。