|
Posted by Doug on 12/12/05 02:34
is order_id unique? In other words, do YOU define the order, or does
the customer? If YOU, then would there ever be a reason to restart
numbering, consolidating, or otherwise restarting? Would you ever
"change" the order number for a specific order?
I'd say in general that you would be better off to define an order
using an identity key. This will assign it a number that no end user
will ever see. You never know what the future might bring.
For the "order" "row", you will have attributes. The date of the
initial order, hte "order year", the customer, etc.
You will also have a different table of "order items." Each row will
have ANOTHER unique identity key. It will also have the Order identity,
line item, part ordered, etc.
Then, build generic code you will use over and order that does a
"select order year, order number, orderid, line item, etc etc from
ORDERS left outer join ORDERDETAIL on Orders.orderid =
ORDERDETAIL.orderid where blah blah blah"
Navigation:
[Reply to this message]
|