Web Development

General discussion


Auto Increment (kind of)

By kurdtpage ·
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?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Not really

by Tony Hopkinson In reply to Auto Increment (kind of)

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.

Collapse -


by Abhijit.a.Pande In reply to Auto Increment (kind of)

You can Add another field, Then order by that field

Related Discussions

Related Forums