Solved

Want to get groups of 100 records

Posted on 2011-02-15
1
306 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
In this article I will describe the Backup & Restore 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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now