Discussion Locked

Auto Increment (kind of)

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm trying to create an auto-increment field, but one that can be changed. I have a list of suppliers, and instead of sorting alphabetically, I have a field in the table called SupplierOrder. The query sorts by this field.
Lets say I have 10 suppliers. If I add a new supplier, I want the SupplierOrder field to be "11", but I also want to be able to change the order that the suppliers appear in.
Is this possible?

2 replies

by tony hopkinson

Add a another column, or pehaps a set of queries using other data to do the sort, cheapest, quickest, nearest, preferred etc. There's good argument for some sort of ranking table keyed by supplier id, ranking set on a monthly basis so they don't jump about a lot.
Lots of added value in there.

This discussion is closed to new replies.