|
Posted by Yannick Turgeon on 10/19/05 19:07
Hello all,
I'm using SS2K on W2k.
I'v got a table say, humm, "Orders" with two fields in the PK:
OrderDate and CustomerID. I would like to add an "ID" column which
would be auto-increment (and would be the new PK). But, I would really
like to have orders with the oldest OrderDate having the smallest ID
number and, for a same OrderDate, I'd to have the smallest CustomerID
first. So my question is:
How could I add an auto-increment column to a table and make it create
its values in a particular order (sort by OrderDate then CustomerID
here)?
In the real situation, the table I want to modify has around 500k
records and the PK has 5 fields and I want to sort on three of them.
Thanks for you help
Yannick
Navigation:
[Reply to this message]
|