写sp4,传xml格式的字符串到数据库然后取出来.....
DECLARE @num int
DECLARE @size int
DECLARE @BeginSize int
SELECT
@num=COUNT(1)
FROM [IPP3].[dbo].[News]
SET @size=@num/2000
SET @BeginSize=0
IF (2000*@size<@num)
BEGIN
SET @size=@size+1
END
WHILE @BeginSize<@size
BEGIN
WAITFOR delay '00:00:10';
UPDATE N
SET N.AreaShow='111'
FROM (
SELECT TOP 2000 *
FROM [IPP3].[dbo].[News] WHERE SysNo NOT IN (SELECT TOP (2000*@BeginSize) SysNo FROM [IPP3].[dbo].[News])
) N
SET @BeginSize=@BeginSize+1
PRINT @BeginSize
END
IPP3,哈哈哈。。
select * from