Production.TransactionHistory
Documentation | AdventureWorks |
Schema | Production |
Name | TransactionHistory |
Module | Manufacturing |
Record of each purchase order, sales order, or work order transaction year to date.
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | TransactionID | int | Identity | Primary key for TransactionHistory records. | ||||
Primary key for TransactionHistory records. Identity |
||||||||
2 | ProductID | int | Production.Product | Product identification number. Foreign key to Product.ProductID. | ||||
Product identification number. Foreign key to Product.ProductID. References: Production.Product |
||||||||
3 | ReferenceOrderID | int | Purchase order, sales order, or work order identification number. | |||||
Purchase order, sales order, or work order identification number. |
||||||||
4 | ReferenceOrderLineID | int | Default: 0 | Line number associated with the purchase order, sales order, or work order. | ||||
Line number associated with the purchase order, sales order, or work order. Default: 0 |
||||||||
5 | TransactionDate | datetime | Default: getdate() | Date and time of the transaction. | ||||
Date and time of the transaction. Default: getdate() |
||||||||
6 | TransactionType | nchar(1) | W = WorkOrder, S = SalesOrder, P = PurchaseOrder | |||||
W = WorkOrder, S = SalesOrder, P = PurchaseOrder |
||||||||
7 | Quantity | int | Product quantity. | |||||
Product quantity. |
||||||||
8 | ActualCost | money | Product cost. | |||||
Product cost. |
||||||||
9 | ModifiedDate | datetime | Default: getdate() | Date and time the record was last updated. | ||||
Date and time the record was last updated. Default: getdate() |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
Production.TransactionHistory | Production.Product | Production.TransactionHistory.ProductID = Production.Product.ProductID | FK_TransactionHistory_Product_ProductID Foreign key constraint referencing Product.ProductID. |
|
Production.TransactionHistory.ProductID = Production.Product.ProductID Name: FK_TransactionHistory_Product_ProductIDForeign key constraint referencing Product.ProductID. |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
PK_TransactionHistory_TransactionID | TransactionID | Primary key (clustered) constraint | |
Primary key (clustered) constraint |
Uses
Name |
---|
Production.TransactionHistory
|
Used by
Name |
---|
Production.TransactionHistory
|
Exported: 2019-02-04 23:13, Last imported: 2018-03-07 11:56