Selecting rows in numerical order with out a key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that is 1.8 million rows and I need to place this in excel.
Excel can only take 65500 rows. I need to simply select by rows 1-50000,
then rows 50001 - 10000 and so on.....
 
"... in numerical order..." implies that you have some way to order (sort)
the rows.

One (brute force) way to approach this would be to:

* determine a sort field
* create a select query, sorted by that field, and using the TOP property
to select the TOP 50000 rows
* export the query('s result) to Excel
* convert the query to a Make Table query and run it

You now have the first 50K rows exported, and a new table with those 50K
rows.

* create a new select query, sorted by that field, using TOP 50K, AND "not
in" your new table

This should give you the next 50K.

* export the query's result to Excel
* convert the query to an Append query and append to your new table

Now you have two Excel files with the first 100K rows, and a table with the
100K rows you exported.

* Reuse the select version of the second query and export to Excel
* Reconvert to Append and append the third 50K rows to the new table.

Repeat these last two steps until finished.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top