Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2000-09-16 : 20:31:08
|
Rib writes "Hello,
What is the easiest/most efficient way to select a "nTH set" of records....ie, records 11-20 out of 100.
It's simple to choose the first 10, by using the TOP parm...ie "SELECT TOP 10 from table where data = criteria". But how would you get the 2nd or 3rd top 10?
To be more specific, I would like to create a stored procedure where you pass an input parm that designates which "set" of records you want....and I could just plug that number into the query(s) for the desired set of data.
Again, the query(s) should be able to retrieve 1-10 out of 100 (the total number is just a hypothetical number), 11-20 of 100, or 80-90 of 100, etc.
Thanks for your time, Rob"
|
|
|
|
|
|