ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   limit records in query (https://www.excelbanter.com/excel-discussion-misc-queries/173188-limit-records-query.html)

dsharbaugh

limit records in query
 
I am using query in excel to pull in data from an Access database. I only
want 20 results, but the option in xls query is not working when I tick it
and select only 20 records to be included. I don't want to limit the records
in Access as the source there is used by other xls queries. Is there
something else I have to do to make the xls query return only 20 records?

FSt1

limit records in query
 
hi.
are we talking about microsoft query ie on the menubar...
dataimport external datanew database query?

normally, a querry return data that matches some criteria or returns it all.
you can restrick the number of records by adding criteria but i know of no
way to restrict it to 20 and only 20 records. the question would come
up....which 20? based on what selection criteria.

Post back if you have quetions.
regards
FSt1

"dsharbaugh" wrote:

I am using query in excel to pull in data from an Access database. I only
want 20 results, but the option in xls query is not working when I tick it
and select only 20 records to be included. I don't want to limit the records
in Access as the source there is used by other xls queries. Is there
something else I have to do to make the xls query return only 20 records?


Tim Zych

limit records in query
 
I see what you're saying...you can limit the records in the options, but
they don't follow through to the spreadsheet, only to the GUI. However you
could add your own Top keyword to the SQL. That seems to work.

--
Tim Zych
SF, CA

"dsharbaugh" wrote in message
...
I am using query in excel to pull in data from an Access database. I only
want 20 results, but the option in xls query is not working when I tick it
and select only 20 records to be included. I don't want to limit the
records
in Access as the source there is used by other xls queries. Is there
something else I have to do to make the xls query return only 20 records?





All times are GMT +1. The time now is 01:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com