Production.TransactionHistoryArchive

Table: 'Production.TransactionHistoryArchive'

9 fields. 75 bytes.

Transactions for previous years.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
TransactionIDint   Not nullPrimary key for TransactionHistoryArchive 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 = Work Order, S = Sales Order, P = Purchase Order(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.TransactionHistoryArchive'

Primary Key NameField Name
PK_TransactionHistoryArchive_TransactionIDTransactionID
There are no Foreign Keys for this table.

Indexes for table 'Production.TransactionHistoryArchive', 3 items

Index NameDescriptionClusteredUniqueFields
PK_TransactionHistoryArchive_TransactionIDClustered index created by a primary key constraint.YesYesTransactionID
IX_TransactionHistoryArchive_ProductIDNonclustered index.NoNoProductID
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineIDNonclustered index.NoNoReferenceOrderID, ReferenceOrderLineID

Triggers for table 'Production.TransactionHistoryArchive', 1 item

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

Dependencies for table 'Production.TransactionHistoryArchive', 2 items

Object NameTypeField Name
Production.CK_TransactionHistoryArchive_TransactionTypecheck cnsN/A
Production.uTransactionHistoryArchivetriggerN/A