Originally Posted by
JohnM3
From out of a book by Allison and Berkowitz -
Using TOP (without an ORDER BY results in records being delivered in the SAME order
as they appear in the table.
You might consider.
(1) Get out of Access
(2) Make a FILE Copy of your ACCDB file.
(3) Rename the COPY to _whatever_.
(4) Open up _whatever_.
(5) From the BIG CIRCLE thingie (top left corner) CLICK -> MANAGE -> Compact and Repair
(6) Re-run your code pointing to _whatever_
I am NOT saying that the above is necessary. I _don't_ have a clue if there is a problem
and if there is - what it might be.
At the end of the day - to get the results you need - you will need to add an ORDER BY.
fwiw - I have _never_ thought of ORDER BY as a hack but that notwithstanding - I am not
certain why the records are not returned IN THE SAME ORDER as they are in the table.
regards
John
Bookmarks