Solved

Want to get groups of 100 records

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
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…

757 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