Can you autonumber in a query based on sorting order?

  • Thread starter Thread starter Amy Stevens
  • Start date Start date
A

Amy Stevens

Greetings,

I would like to assign a rank (#1, #2 ..) based on a two
sorted fields, category and score. I would then like to
append that query to a table.

Is this possible?

Thanks,
Amy in Boston
 
Hi,


Generally, if you append a selection of records where there is an ORDER
BY clause, into a table with an autonumber field, an incremental one, not a
random one, the insertion will follow the ORDER BY sequence and thus, the
autonumber will supply the rank. So, if the table has an autonumber field,
just append the *sorted* records to the table (without supplying a value
for the autonumber field, in the insert statement).


Hoping it may help,
Vanderghast, Access MVP
 
That would work great if I was only ranking on the score
and not within each category and then the score. I will
be able to use this in a differnt table though, so thank
you very much for your reply!
 
Back
Top