Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What is the SQL to select first 100 records?

Posted on 2011-09-13
2
Medium Priority
?
518 Views
Last Modified: 2012-05-12
What is the SQL to select first 100 records?

Currently I am using SELECT TOP 100 but this gives me records that have the same value in the descending field

Thanks
0
Comment
Question by:kosenrufu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36530413
post a copy of the db and explain, which records you want to see using a select top 100 query..
0
 
LVL 48

Accepted Solution

by:
Dale Fye earned 2000 total points
ID: 36530446
When you use a single field in your Group BY clause, and then indicate Select Top 100, you will get the top 100, plus any additional records where the value in the field you are grouping by is the same as for the 100th record.

To alleviate this, you should add another field to the group by clause.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

609 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