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

From dbscript Online Help
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
|-
+
|- valign="top"
 
| '''Table
 
| '''Table
 
| Production.TransactionHistory
 
| Production.TransactionHistory
|-
+
|- valign="top"
 +
| '''Description
 +
| Record of each purchase order, sales order, or work order transaction year to date.
 
|}
 
|}
  
 
+
=== 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 15: Line 17:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''PK
+
| '''Description
| '''Index
+
 
+
|- valign="top"
|-
 
 
| TransactionID
 
| TransactionID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| PK_TransactionHistory_TransactionID
+
| Primary key for TransactionHistory records.
|
+
|- valign="top"
|-
 
 
| ProductID
 
| ProductID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
|  
+
| Product identification number. Foreign key to Product.ProductID.
| IX_TransactionHistory_ProductID
+
|- valign="top"
|-
 
 
| ReferenceOrderID
 
| ReferenceOrderID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
|  
+
| Purchase order, sales order, or work order identification number.
| IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
+
|- valign="top"
|-
 
 
| ReferenceOrderLineID
 
| ReferenceOrderLineID
 
| int
 
| int
 
| not null
 
| not null
 
| ((0))
 
| ((0))
|  
+
| Line number associated with the purchase order, sales order, or work order.
| IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
+
|- valign="top"
|-
 
 
| TransactionDate
 
| TransactionDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
|  
+
| Date and time of the transaction.
|
+
|- valign="top"
|-
 
 
| TransactionType
 
| TransactionType
 
| nchar(1)
 
| nchar(1)
 
| not null
 
| not null
 
|  
 
|  
|  
+
| W = WorkOrder, S = SalesOrder, P = PurchaseOrder
|
+
|- valign="top"
|-
 
 
| Quantity
 
| Quantity
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
|  
+
| Product quantity.
|
+
|- valign="top"
|-
 
 
| ActualCost
 
| ActualCost
 
| money
 
| money
 
| not null
 
| not null
 
|  
 
|  
|  
+
| Product cost.
|
+
|- valign="top"
|-
 
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
 +
| 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
 +
|- valign="top"
 +
| PK_TransactionHistory_TransactionID
 +
| TransactionID
 +
|}
 +
 +
=== Indexes ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Index
 +
| '''Type
 +
| '''Columns
 +
 +
|- valign="top"
 +
| IX_TransactionHistory_ProductID
 
|  
 
|  
 +
| ProductID
 +
|- valign="top"
 +
| IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
 
|  
 
|  
 +
| ReferenceOrderID, ReferenceOrderLineID
 
|}
 
|}
  
 +
=== Check Constraints ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Check Constraint
 +
| '''Expression
 +
| '''Description
  
 +
|- valign="top"
 +
| CK_TransactionHistory_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')
 +
|}
  
 +
=== Foreign Keys ===
 
{| 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 90: Line 121:
 
| '''Column
 
| '''Column
 
| '''Referenced Column
 
| '''Referenced Column
+
 
|-
+
|- valign="top"
 
| [[Production.Product_(table)|Production.Product]]
 
| [[Production.Product_(table)|Production.Product]]
 
| ProductID
 
| ProductID
 
| ProductID
 
| ProductID
 
|}
 
|}
 +
 +
=== References ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Dependency Type
 +
| '''Object Type
 +
| '''Referenced Object
 +
 +
|- valign="top"
 +
| Schema
 +
| Schema
 +
| [[Production_(schema)|Production]]
 +
 +
|}
 +
 +
=== Dependencies ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Reference Type
 +
| '''Object Type
 +
| '''Referencing Object
 +
 +
| '''Child Type
 +
| '''Child Object
 +
 +
|- valign="top"
 +
| Insert
 +
| Table
 +
| [[Production.WorkOrder_(table)|Production.WorkOrder]]
 +
 +
| Trigger
 +
| iWorkOrder
 +
|- valign="top"
 +
| Insert
 +
| Table
 +
| [[Production.WorkOrder_(table)|Production.WorkOrder]]
 +
 +
| Trigger
 +
| uWorkOrder
 +
|- valign="top"
 +
| Insert
 +
| Table
 +
| [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]]
 +
 +
| Trigger
 +
| iPurchaseOrderDetail
 +
|- valign="top"
 +
| Insert
 +
| Table
 +
| [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]]
 +
 +
| Trigger
 +
| uPurchaseOrderDetail
 +
|- valign="top"
 +
| Insert
 +
| Table
 +
| [[Sales.SalesOrderDetail_(table)|Sales.SalesOrderDetail]]
 +
 +
| Trigger
 +
| iduSalesOrderDetail
 +
|}
 +
 +
 
== automatically generated ==
 
== automatically generated ==
  
Line 103: Line 197:
 
| Production.TransactionHistory
 
| Production.TransactionHistory
 
|- valign="top"
 
|- valign="top"
 
 
| '''Description
 
| '''Description
 
| Record of each purchase order, sales order, or work order transaction year to date.
 
| Record of each purchase order, sales order, or work order transaction year to date.
 
|-
 
|-
 
 
|}
 
|}
  
Line 192: Line 284:
 
{| 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"
| '''Referencing Object
+
| '''Dependency Type
 
| '''Object Type
 
| '''Object Type
 +
| '''Referenced Object
 +
 +
|-
 +
| Schema
 +
| Schema
 +
| [[Production_(schema)|Production]]
 +
 +
|}
 +
 +
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 
| '''Reference Type
 
| '''Reference Type
+
| '''Object Type
 +
| '''Referencing Object
 +
 
 +
| '''Child Type
 +
| '''Child Object
 +
 
 
|-
 
|-
 +
| Insert
 +
| Table
 
| [[Production.WorkOrder_(table)|Production.WorkOrder]]
 
| [[Production.WorkOrder_(table)|Production.WorkOrder]]
 +
 +
| Trigger
 +
| iWorkOrder
 +
|-
 +
| Insert
 
| Table
 
| Table
 +
| [[Production.WorkOrder_(table)|Production.WorkOrder]]
 +
 +
| Trigger
 +
| uWorkOrder
 +
|-
 
| Insert
 
| Insert
 +
| Table
 +
| [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]]
 +
 +
| Trigger
 +
| iPurchaseOrderDetail
 
|-
 
|-
| [[Production.WorkOrder_(table)|Production.WorkOrder]]
+
| Insert
 
| Table
 
| Table
| Insert
+
| [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]]
 +
 
 +
| Trigger
 +
| uPurchaseOrderDetail
 
|-
 
|-
| [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]]
 
| Table
 
 
| Insert
 
| Insert
|-
 
| [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]]
 
 
| Table
 
| Table
| Insert
 
|-
 
 
| [[Sales.SalesOrderDetail_(table)|Sales.SalesOrderDetail]]
 
| [[Sales.SalesOrderDetail_(table)|Sales.SalesOrderDetail]]
| Table
+
 
| Insert
+
| Trigger
 +
| iduSalesOrderDetail
 
|}
 
|}

Latest revision as of 23:16, 23 June 2010

wikibot[edit]

Table Production.TransactionHistory
Description Record of each purchase order, sales order, or work order transaction year to date.

Columns[edit]

Column Data Type Nullable Default Description
TransactionID int not null Primary key for TransactionHistory 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 = WorkOrder, S = SalesOrder, P = PurchaseOrder
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[edit]

Primary Key Columns
PK_TransactionHistory_TransactionID TransactionID

Indexes[edit]

Index Type Columns
IX_TransactionHistory_ProductID ProductID
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID ReferenceOrderID, ReferenceOrderLineID

Check Constraints[edit]

Check Constraint Expression Description
CK_TransactionHistory_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')

Foreign Keys[edit]

Relation Column Referenced Column
Production.Product ProductID ProductID

References[edit]

Dependency Type Object Type Referenced Object
Schema Schema Production

Dependencies[edit]

Reference Type Object Type Referencing Object Child Type Child Object
Insert Table Production.WorkOrder Trigger iWorkOrder
Insert Table Production.WorkOrder Trigger uWorkOrder
Insert Table Purchasing.PurchaseOrderDetail Trigger iPurchaseOrderDetail
Insert Table Purchasing.PurchaseOrderDetail Trigger uPurchaseOrderDetail
Insert Table Sales.SalesOrderDetail Trigger iduSalesOrderDetail


automatically generated[edit]

Table Production.TransactionHistory
Description Record of each purchase order, sales order, or work order transaction year to date.


Column Data Type Nullable Default Description / PK / Index
TransactionID int not null Primary key for TransactionHistory records.
PK_TransactionHistory_TransactionID
ProductID int not null Product identification number. Foreign key to Product.ProductID.
IX_TransactionHistory_ProductID
ReferenceOrderID int not null Purchase order, sales order, or work order identification number.
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
ReferenceOrderLineID int not null (0) Line number associated with the purchase order, sales order, or work order.
IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
TransactionDate datetime not null (GETDATE()) Date and time of the transaction.
TransactionType nchar(1) not null W = WorkOrder, S = SalesOrder, P = PurchaseOrder
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.


Relation Column Referenced Column
Production.Product ProductID ProductID


Dependency Type Object Type Referenced Object
Schema Schema Production


Reference Type Object Type Referencing Object Child Type Child Object
Insert Table Production.WorkOrder Trigger iWorkOrder
Insert Table Production.WorkOrder Trigger uWorkOrder
Insert Table Purchasing.PurchaseOrderDetail Trigger iPurchaseOrderDetail
Insert Table Purchasing.PurchaseOrderDetail Trigger uPurchaseOrderDetail
Insert Table Sales.SalesOrderDetail Trigger iduSalesOrderDetail