Solved

What is the SQL to select first 100 records?

Posted on 2011-09-13
2
430 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
2 Comments
 
LVL 119

Expert Comment

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

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

707 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

19 Experts available now in Live!

Get 1:1 Help Now