ShockUK
asked on
Export first 100 records from a table into Excel
Hello,
I have created a table which is created from 2 append queries. I have indexed the table so field 'Total'
is in descending order. Will this stay in descending order all the time now?
My query is the table contains 22,000 entries and I only want the top 100 exported to Excel.
Is it possible to loop through the table to only paste the first 100 entries to Excel and forget
the rest?
Thanks
Ian
I have created a table which is created from 2 append queries. I have indexed the table so field 'Total'
is in descending order. Will this stay in descending order all the time now?
My query is the table contains 22,000 entries and I only want the top 100 exported to Excel.
Is it possible to loop through the table to only paste the first 100 entries to Excel and forget
the rest?
Thanks
Ian
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(Will this stay in descending order all the time now?)
may or may not, but that is irrelevant . You can always sort them using a query.
may or may not, but that is irrelevant . You can always sort them using a query.
the order by will determine which 100 you want to get
select top 100 *
from TableX
order by [fieldName]