Unanswered: How to fetch limited record from SQL Server like 20-40 records out of 20000 records
I have 20,000 records in a table and i want to do paging in ASP.
I have to display 20 records per page. I will take count(*) from table and divide it by 20 and display the no.of pages and give the links like page-1 page-2 and so on.
If i click on page-2 it has to fetch only 20-40 records off 20000 records.
If I use "Top 20 " key word, i will get first 20 records only. But I need to get 20-40 records.
I know that we can achieve this in Oracle using the ROWNUM like the follwing query.
"select * from tblPerson where ROWNUM>20 and ROWNUM<40".
Is there any way to get the same in SQL Server7.0.
you've posted this question 3 times...and already had replies to it...if those replies aren't the answer you're looking for then post a reply back to it...don't keep posting the same question over and over.