Solved

Access - Select record # in Query

Posted on 2011-03-07
4
238 Views
Last Modified: 2012-05-11
Hi,

Is there a way in Query Design View, I can select only the first 1 - 50,000 of 100,000 records to be displayed? (perhaps in the 'Criteria' section).

Thanks
0
Comment
Question by:tahirih
  • 3
4 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 35059113
I'm not sure about the Designer, but you could open up SQL view and add "top 50000" to your query.

Example:
SELECT TOP 50000 *
FROM tblName

Open in new window

0
 

Author Comment

by:tahirih
ID: 35059227
I am adding other parameters to this query, but simplified it for the posting of the question.

Please find the SQL statement as follows:

SELECT [I10-I9 Dx Gem].[ICD-10 Dx Code], Count([I10-I9 Dx Gem].[ICD-10 Dx Code]) AS [CountOfICD-10 Dx Code]
FROM [I10-I9 Dx Gem]
GROUP BY [I10-I9 Dx Gem].[ICD-10 Dx Code];

0
 

Author Comment

by:tahirih
ID: 35059248
The following worked:

SELECT TOP 50000 [I10-I9 Dx Gem].[ICD-10 Dx Code], Count([I10-I9 Dx Gem].[ICD-10 Dx Code]) AS [CountOfICD-10 Dx Code]
FROM [I10-I9 Dx Gem]
GROUP BY [I10-I9 Dx Gem].[ICD-10 Dx Code];


0
 

Author Comment

by:tahirih
ID: 35059251
Please confirm what the statement would be for the remaining, > 50000

Thank you
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

772 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