Owner: Production 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 4960 
Index Size KB: 2352 
Rows: 89253 
Description: Transactions for previous years. 


Name Data Type Length NULL Default IsIdentity IsGUID Description
    TransactionID  int          Primary key for TransactionHistoryArchive records. 
    ProductID  int          Product identification number. Foreign key to Product.ProductID. 
    ReferenceOrderID  int          Purchase order, sales order, or work order identification number. 
    ReferenceOrderLineID  int    ((0))      Line number associated with the purchase order, sales order, or work order. 
    TransactionDate  datetime    (getdate())      Date and time of the transaction. 
    TransactionType  nchar          W = Work Order, S = Sales Order, P = Purchase Order 
    Quantity  int          Product quantity. 
    ActualCost  money          Product cost. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 9 column(s)


Index Primary Unique Description
  PK_TransactionHistoryArchive_TransactionID      Primary key (clustered) constraint 
  IX_TransactionHistoryArchive_ProductID      Nonclustered index. 
  IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID      Nonclustered index. 
Total: 3 index(es)

Check Constraints

Name Expression
  CK_TransactionHistoryArchive_TransactionType  (upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W') 
Total: 1 constraint(s)


CREATE TABLE [TransactionHistoryArchive] (
    [TransactionID] [int] NOT NULL ,
    [ProductID] [int] NOT NULL ,
    [ReferenceOrderID] [int] NOT NULL ,
    [ReferenceOrderLineID] [int] NOT NULL CONSTRAINT [DF_TransactionHistoryArchive_ReferenceOrderLineID] DEFAULT ((0)),
    [TransactionDate] [datetime] NOT NULL CONSTRAINT [DF_TransactionHistoryArchive_TransactionDate] DEFAULT (getdate()),
    [TransactionType] [nchar] (1) COLLATE Latin1_General_CS_AS NOT NULL ,
    [Quantity] [int] NOT NULL ,
    [ActualCost] [money] NOT NULL ,
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_TransactionHistoryArchive_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_TransactionHistoryArchive_TransactionID] PRIMARY KEY  CLUSTERED
    )  ON [PRIMARY] ,
    CONSTRAINT [CK_TransactionHistoryArchive_TransactionType] CHECK (upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W')

See Also

List of tables