Difference between revisions of "Production.TransactionHistoryArchive (table)"

From dbscript Online Help
Jump to: navigation, search
Line 12: Line 12:
  
  
 +
=== Columns ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 18: Line 19:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description / PK / Index
+
| '''Description
 
 
 
|- valign="top"
 
|- valign="top"
Line 25: Line 26:
 
| not null
 
| not null
 
|  
 
|  
| Primary key for TransactionHistoryArchive records.<br />PK_TransactionHistoryArchive_TransactionID
+
| Primary key for TransactionHistoryArchive records.
 
|- valign="top"
 
|- valign="top"
 
| ProductID
 
| ProductID
Line 31: Line 32:
 
| not null
 
| not null
 
|  
 
|  
| Product identification number. Foreign key to Product.ProductID.<br />IX_TransactionHistoryArchive_ProductID
+
| Product identification number. Foreign key to Product.ProductID.
 
|- valign="top"
 
|- valign="top"
 
| ReferenceOrderID
 
| ReferenceOrderID
Line 37: Line 38:
 
| not null
 
| not null
 
|  
 
|  
| Purchase order, sales order, or work order identification number.<br />IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID
+
| Purchase order, sales order, or work order identification number.
 
|- valign="top"
 
|- valign="top"
 
| ReferenceOrderLineID
 
| ReferenceOrderLineID
Line 43: Line 44:
 
| not null
 
| not null
 
| ((0))
 
| ((0))
| Line number associated with the purchase order, sales order, or work order.<br />IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID
+
| Line number associated with the purchase order, sales order, or work order.
 
|- valign="top"
 
|- valign="top"
 
| TransactionDate
 
| TransactionDate
Line 49: Line 50:
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date and time of the transaction.<br />
+
| Date and time of the transaction.
 
|- valign="top"
 
|- valign="top"
 
| TransactionType
 
| TransactionType
Line 55: Line 56:
 
| not null
 
| not null
 
|  
 
|  
| W = Work Order, S = Sales Order, P = Purchase Order<br />
+
| W = Work Order, S = Sales Order, P = Purchase Order
 
|- valign="top"
 
|- valign="top"
 
| Quantity
 
| Quantity
Line 61: Line 62:
 
| not null
 
| not null
 
|  
 
|  
| Product quantity.<br />
+
| Product quantity.
 
|- valign="top"
 
|- valign="top"
 
| ActualCost
 
| ActualCost
Line 67: Line 68:
 
| not null
 
| not null
 
|  
 
|  
| Product cost.<br />
+
| Product cost.
 
|- valign="top"
 
|- valign="top"
 
| ModifiedDate
 
| ModifiedDate
Line 73: Line 74:
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date and time the record was last updated.<br />
+
| Date and time the record was last updated.
 
|}
 
|}
  
 +
=== Primary Key ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Primary Key
 +
| '''Columns
 +
|-
 +
| PK_TransactionHistoryArchive_TransactionID
 +
| TransactionID
 +
|}
 +
 +
=== Indexes ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Index
 +
| '''Type
 +
| '''Columns
 +
 +
|-
 +
| IX_TransactionHistoryArchive_ProductID
 +
|
 +
| ProductID
 +
|-
 +
| IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID
 +
|
 +
| ReferenceOrderID, ReferenceOrderLineID
 +
|}
  
 +
=== Check Constraints ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Check Constraint
 +
| '''Expression
 +
| '''Description
 +
 +
|-
 +
| CK_TransactionHistoryArchive_TransactionType
 +
| (upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W')
 +
| Check constraint [TransactionType]='p' OR [TransactionType]='s' OR [TransactionType]='w' OR [TransactionType]='P' OR [TransactionType]='S' OR [TransactionType]='W'
 +
|}
  
  

Revision as of 22:52, 2 February 2010

wikibot

Table Production.TransactionHistoryArchive
Description Transactions for previous years.


Columns

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

Primary Key

Primary Key Columns
PK_TransactionHistoryArchive_TransactionID TransactionID

Indexes

Index Type Columns
IX_TransactionHistoryArchive_ProductID ProductID
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID ReferenceOrderID, ReferenceOrderLineID

Check Constraints

Check Constraint Expression Description
CK_TransactionHistoryArchive_TransactionType (upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W') Check constraint [TransactionType]='p' OR [TransactionType]='s' OR [TransactionType]='w' OR [TransactionType]='P' OR [TransactionType]='S' OR [TransactionType]='W'


automatically generated

Table Production.TransactionHistoryArchive
Description Transactions for previous years.


Column Data Type Nullable Default Description / PK / Index
TransactionID int not null Primary key for TransactionHistoryArchive records.
PK_TransactionHistoryArchive_TransactionID
ProductID int not null Product identification number. Foreign key to Product.ProductID.
IX_TransactionHistoryArchive_ProductID
ReferenceOrderID int not null Purchase order, sales order, or work order identification number.
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID
ReferenceOrderLineID int not null (0) Line number associated with the purchase order, sales order, or work order.
IX_TransactionHistoryArchive_ReferenceOrderID_ReferenceOrderLineID
TransactionDate datetime not null (GETDATE()) Date and time of the transaction.
TransactionType nchar(1) not null W = Work Order, S = Sales Order, P = Purchase Order
Quantity int not null Product quantity.
ActualCost money not null Product cost.
ModifiedDate datetime not null (GETDATE()) Date and time the record was last updated.


Dependency Type Object Type Referenced Object
Schema Schema Production