Solved

Want to get groups of 100 records

Posted on 2011-02-15
1
307 Views
Last Modified: 2012-05-11
I can get the top 100 records by

select top 100 LastName from clientinformation

is there any way to get the 201 - 300th record 301 - 400th record and so on ....

Thanks
0
Comment
Question by:charlesbaldo
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 34903757
How about:
// 200 - 300
SELECT TOP 100 LastName FROM clientInformation
WHERE LastName NOT IN (SELECT TOP 100 LastName FROM clientInformation)

// 300 - 400
SELECT TOP 100 LastName FROM clientInformation
WHERE LastName NOT IN (SELECT TOP 200 LastName FROM clientInformation)

// 400 - 500
SELECT TOP 100 LastName FROM clientInformation
WHERE LastName NOT IN (SELECT TOP 300 LastName FROM clientInformation)

etc.

Open in new window

0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
configure service broker on all databases 2 81
Bubble user-defined Sql RAISERROR(...) to c# exception 14 166
Query 14 55
Anyway to make these 2 SQL statements into one? 13 38
Do you hate spam? I do, and I am willing to bet you do as well. I often wonder, though, "if people hate spam so much, why do they still post their email addresses on the web?" I'm not talking about a plain-text posting here. I am referring to the fa…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question