Link to home
Start Free TrialLog in
Avatar of ShockUK
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
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

you can get the top 100  using a query
the order by will determine which 100  you want to get

select top 100 *
from TableX
order by [fieldName]
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
(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.