selecting a range of records from the database
MSSQL server seems no way to get the current sequence
value on a query result. However, you may use the temp
table to do this. Here is very simple example of a stored
procedure that should do what you need to do.
------------
CREATE PROCEDURE dbo.Subset
@startpoint int,
@range int
AS
SELECT IDENTITY(INT, 1, 1) AS ident, * INTO #T1 from
mytable
select * from #T1 where ident >= @startpoint and ident <=
@startpoint+@range-1
GO
---------------------
|