sql server 2000 分页问题
CREATE PROCEDURE [DBO].[Job_SearchPerson] @PIndex int, @PSize int, @ZWP int, @area int AS SELECT TOP (@PSize) [姓名] FROM [TAB1] WHERE ID NOT IN (SELECT TOP (@PSize*(@PIndex-1)) ID FROM [TAB1] ORDER BY [姓名]) ORDER BY [姓名] GO
EXEC('ELECT TOP '+@PSize'+ [姓名] FROM [TAB1] WHERE ID NOT IN (SELECT TOP '+@PSize*(@PIndex-1)'+ ID FROM [TAB1] ORDER BY [姓名]) ORDER BY [姓名]')