How can I read the first n records with a select query, and then the next n an then the next n and so on ?