Solved

What is the SQL to select first 100 records?

Posted on 2011-09-13
2
454 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 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 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

786 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