I believe you are asking "How do I return the 50th through 100th record of a result set?" Potentially for paging reasons, etc. Kind of like using the "TOP" keyword in a SELECT statement, but you want some out of the middle instead of from the top...
You could use a cursor, but you could also use a temp table that has an identity column defined. Of course, if you have a ton of data this may be bad, but then a cursor would be bad too.
This is what I've done. I'm not sure I like it, but it worked.
Create Procedure NewStoredProcedureName
@Min_Record integer,
@Max_Record integer
AS
CREATE TABLE #Temp
(Record_Number numeric IDENTITY,
Field1 integer,
Field2 datetime,
Field3 varchar(5))
INSERT INTO #Temp (Field1, Field2, Field3)
SELECT t.Field1, t.Field2, t.Field3
FROM Table t
ORDER BY t.Field1
SELECT Field1, Field2, Field3
FROM #Temp
WHERE (Record_Number >= @Min_Record
and Record_Number <= @Max_Record)
ORDER BY Record_Number
If you want to get record 50 to 100 and then get record 100 to 150, the Order by clause in the insert/select is extremely important so the identity field value is assigned to the same record each time.
Hope this helps.