Is There Away to Avoid Sorting?

T

tanorris

Is there a way to avoid sorting (Asc and Desc), including the Access
default sorting? I do not want any sorting to occur in a SELECT
query. TIA

Tom
 
R

Rick Brandt

Is there a way to avoid sorting (Asc and Desc), including the Access
default sorting? I do not want any sorting to occur in a SELECT
query. TIA

Tom

If you specify no sorting at all explicitly then you will normally get the
records in the order thay are retrieved from disk. In a file that is compacted
regularly this will usually be Primary Key order. If what you want is a truly
random order then I'm not aware of an easy way to achieve that.
 
J

John Vinson

But, how do you actually specify no sorting in the Query?

The question as phrased is meaningless.

You will get the results in SOME order. If you do not specify a sort term in
the query then you will get the records in whatever order the Access query
optimizer finds most convenient - usually, as Rick suggests, in primary key
order, though I wouldn't count on it.

If by "no sorting" you mean "in the order in which I inputted the records
originally" then - YOU CAN'T. Access does *not* record or remember the order
in which records were entered; there are no "row numbers" or the like in an
Access table. If you wish to keep the order the same as the records were
entered (which I'm *guessing* is what you mean) then you must - no option! -
provide *some* field in the table to preserve that order. This could be a
sequential Autonumber, or a timestamp field with a default value of Now(). A
Query sorting by this field will recover the data-entry order.

John W. Vinson/MVP
 
Top