Editing Production.TransactionHistory (table)

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
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 17: Line 15:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description
+
| '''PK
 
+
| '''Index
|- valign="top"
+
 +
|-
 
| TransactionID
 
| TransactionID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Primary key for TransactionHistory records.
+
| PK_TransactionHistory_TransactionID
|- valign="top"
+
|
 +
|-
 
| ProductID
 
| ProductID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Product identification number. Foreign key to Product.ProductID.
+
|  
|- valign="top"
+
| IX_TransactionHistory_ProductID
 +
|-
 
| ReferenceOrderID
 
| ReferenceOrderID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Purchase order, sales order, or work order identification number.
+
|  
|- valign="top"
+
| IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
 +
|-
 
| ReferenceOrderLineID
 
| ReferenceOrderLineID
 
| int
 
| int
 
| not null
 
| not null
 
| ((0))
 
| ((0))
| Line number associated with the purchase order, sales order, or work order.
+
|  
|- valign="top"
+
| IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
 +
|-
 
| TransactionDate
 
| TransactionDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date and time of the transaction.
 
|- valign="top"
 
| TransactionType
 
| nchar(1)
 
| not null
 
 
|  
 
|  
| W = WorkOrder, S = SalesOrder, P = PurchaseOrder
 
|- valign="top"
 
| Quantity
 
| int
 
| not null
 
 
|  
 
|  
| Product quantity.
+
|-
|- valign="top"
+
| TransactionType
| ActualCost
+
| nchar(0)
| money
 
 
| not null
 
| not null
 
|  
 
|  
| Product cost.
 
|- valign="top"
 
| ModifiedDate
 
| datetime
 
| not null
 
| (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"
 
|- style="background:silver"
 
| '''Relation
 
| '''Column
 
| '''Referenced Column
 
 
|- valign="top"
 
| [[Production.Product_(table)|Production.Product]]
 
| 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 ==
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
 
|-
 
|-
| '''Table
+
| Quantity
| Production.TransactionHistory
 
|- valign="top"
 
| '''Description
 
| Record of each purchase order, sales order, or work order transaction year to date.
 
|-
 
|}
 
 
 
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Column
 
| '''Data Type
 
| '''Nullable
 
| '''Default
 
| '''Description / PK / Index
 
 
|- valign="top"
 
| TransactionID
 
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Primary key for TransactionHistory records.<br />PK_TransactionHistory_TransactionID
 
|- valign="top"
 
| ProductID
 
| int
 
| not null
 
 
|  
 
|  
| Product identification number. Foreign key to Product.ProductID.<br />IX_TransactionHistory_ProductID
 
|- valign="top"
 
| ReferenceOrderID
 
| int
 
| not null
 
 
|  
 
|  
| Purchase order, sales order, or work order identification number.<br />IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
+
|-
|- valign="top"
+
| ActualCost
| ReferenceOrderLineID
+
| money
| int
 
| not null
 
| (0)
 
| Line number associated with the purchase order, sales order, or work order.<br />IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID
 
|- valign="top"
 
| TransactionDate
 
| datetime
 
| not null
 
| (GETDATE())
 
| Date and time of the transaction.<br />
 
|- valign="top"
 
| TransactionType
 
| nchar(1)
 
 
| not null
 
| not null
 
|  
 
|  
| W = WorkOrder, S = SalesOrder, P = PurchaseOrder<br />
 
|- valign="top"
 
| Quantity
 
| int
 
| not null
 
 
|  
 
|  
| Product quantity.<br />
 
|- valign="top"
 
| ActualCost
 
| money
 
| not null
 
 
|  
 
|  
| Product cost.<br />
+
|-
|- valign="top"
 
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
 
| not null
 
| not null
| (GETDATE())
+
| (getdate())
| Date and time the record was last updated.<br />
+
|  
 +
|
 
|}
 
|}
  
Line 279: Line 95:
 
| ProductID
 
| ProductID
 
| ProductID
 
| ProductID
|}
 
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Dependency 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
 
| '''Object Type
 
| '''Referencing Object
 
 
| '''Child Type
 
| '''Child Object
 
 
|-
 
| Insert
 
| Table
 
| [[Production.WorkOrder_(table)|Production.WorkOrder]]
 
 
| Trigger
 
| iWorkOrder
 
|-
 
| Insert
 
| Table
 
| [[Production.WorkOrder_(table)|Production.WorkOrder]]
 
 
| Trigger
 
| uWorkOrder
 
|-
 
| Insert
 
| Table
 
| [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]]
 
 
| Trigger
 
| iPurchaseOrderDetail
 
|-
 
| Insert
 
| Table
 
| [[Purchasing.PurchaseOrderDetail_(table)|Purchasing.PurchaseOrderDetail]]
 
 
| Trigger
 
| uPurchaseOrderDetail
 
|-
 
| Insert
 
| Table
 
| [[Sales.SalesOrderDetail_(table)|Sales.SalesOrderDetail]]
 
 
| Trigger
 
| iduSalesOrderDetail
 
 
|}
 
|}

Please note that all contributions to dbscript Online Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Project:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)