Production.TransactionHistory

Table: 'Production.TransactionHistory'

9 fields. 75 bytes.

Record of each purchase order, sales order, or work order transaction year to date.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
TransactionIDint identity int Not nullPrimary key for TransactionHistory records. 
ProductIDint   Not nullProduct identification number. Foreign key to Product.ProductID. 
ReferenceOrderIDint   Not nullPurchase order, sales order, or work order identification number. 
ReferenceOrderLineIDint  (0)Not nullLine number associated with the purchase order, sales order, or work order. 
TransactionDatedatetime  getdate()Not nullDate and time of the transaction. 
TransactionTypenchar1  Not nullW = WorkOrder, S = SalesOrder, P = PurchaseOrder(upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W')
Quantityint   Not nullProduct quantity. 
ActualCostmoney19,4decimal(19,4) Not nullProduct cost. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Production.TransactionHistory'

Primary Key NameField Name
PK_TransactionHistory_TransactionIDTransactionID

Foreign keys for table 'Production.TransactionHistory', 1 item

ForeignPrimaryKey Name
TransactionHistory.ProductIDProduct.ProductIDFK_TransactionHistory_Product_ProductID

Indexes for table 'Production.TransactionHistory', 3 items

Index NameDescriptionClusteredUniqueFields
PK_TransactionHistory_TransactionIDClustered index created by a primary key constraint.YesYesTransactionID
IX_TransactionHistory_ProductIDNonclustered index.NoNoProductID
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineIDNonclustered index.NoNoReferenceOrderID, ReferenceOrderLineID

Triggers for table 'Production.TransactionHistory', 1 item

NameDescriptionTypeEnabled
uTransactionHistoryAFTER UPDATE trigger setting the ModifiedDate column in the TransactionHistory table to the current date.after Update Yes

Dependencies for table 'Production.TransactionHistory', 7 items

Object NameTypeField Name
Production.CK_TransactionHistory_TransactionTypecheck cnsN/A
Production.iWorkOrdertriggerN/A
Production.uTransactionHistorytriggerN/A
Production.uWorkOrdertriggerN/A
Purchasing.iPurchaseOrderDetailtriggerN/A
Purchasing.uPurchaseOrderDetailtriggerN/A
Sales.iduSalesOrderDetailtriggerN/A