SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get listitems between a specified Row Index Boundary from a list using CAML

Ex: if there are 10000 records I would like to fetch records between 201 - 250

share|improve this question

This link has some info about generating pages of results in a CAML query, I have heard that this is ill-advised, though the function detailed in the article seems like a good solution:

share|improve this answer

You can use below code in your solutions-

SPQuery w = new SPQuery() ; w.RowLimit = 10; w.Query = "1570";

share|improve this answer
SPQuery w = new SPQuery() ; w.RowLimit = 50; w.Query = "<Where><Gt><FieldRef Name='ID'/><Value Type='Counter'>1570</Value></Gt></Where>"; – vipin Paliwal Aug 23 '10 at 10:04
The problem is that ID's don;t have to be consecutive, if say item 100 to 300 are deleted, those id's are gone. Once an item has been created, ID's don't change. so querying for 201 - 250 will return an empty result – Colin Jun 11 '11 at 22:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.