database - MS Access row number, specify an index -


Is there any way to access MS to return a dataset between a specific index?

Then I can say my dataset is:

  rank | First_name | Age 1 Max 23 2 Bob 40 3 Sid 25 4 Billy 18 5 Sally 19  

But I only want to return those records between 'ranks' between 2 and 4, so my result is Bob , Sid and Billy? However, the rank is not part of the table, and it must be generated when the query runs. Why I am not using the auto-digitated number, because if any record gets destroyed, it will be incompatible, and what if I want to reverse the results!

This is obviously very simple and I am asking because I am working on a product list and I am looking for a more efficient way of paging through dataset, so if I get only 1 page data from the database, then it is going to be sharper and then set its full set of 3000 records and then sub-selection from that set!

Thanks R.

Basic suggestion:

  SELECT * from the table where between ranks 2 and 4; Modified after comment, it is not present in the rank structure:  
  select the top 100 * from the table;  

And if you want to select later results, then you can identify the last record from the first question, this is ID 101, and one to get the next 100 WHERE Use section;

  Select the top 100 * from the table where the ID & gt; 100;  

But this will not give you what you are looking for.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -