Production.WorkOrderRouting Table
Description
Work order details.
Properties
| Creation Date | 17/07/2014 16:11 |
| File Group | PRIMARY |
| Text File Group | |
| System Object | ![]() |
| Published for Replication | ![]() |
| Rows | 67131 |
| Data Space Used | 5,568.00 KB |
| Index Space Used | 1,376.00 KB |
Columns
| Column Name | Description | Datatype | Length | Allow Nulls | Default | Formula | |
|---|---|---|---|---|---|---|---|
| WorkOrderID | Primary key. Foreign key to WorkOrder.WorkOrderID. | Integer | 4 | |||
| ProductID | Primary key. Foreign key to Product.ProductID. | Integer | 4 | |||
| OperationSequence | Primary key. Indicates the manufacturing process sequence. | SmallInt | 2 | |||
| LocationID | Manufacturing location where the part is processed. Foreign key to Location.LocationID. | SmallInt | 2 | ||||
| ScheduledStartDate | Planned manufacturing start date. | DBTimeStamp | 4 | ||||
| ScheduledEndDate | Planned manufacturing end date. | DBTimeStamp | 4 | ||||
| ActualStartDate | Actual start date. | DBTimeStamp | 4 | ![]() | |||
| ActualEndDate | Actual end date. | DBTimeStamp | 4 | ![]() | |||
| ActualResourceHrs | Number of manufacturing hours used. | Numeric | 9 (9,4) | ![]() | |||
| PlannedCost | Estimated manufacturing cost. | Currency | 8 | ||||
| ActualCost | Actual manufacturing cost. | Currency | 8 | ![]() | |||
| ModifiedDate | Date and time the record was last updated. | DBTimeStamp | 4 | (getdate()) |
Indexes
| Index | Description | Primary | Unique |
|---|---|---|---|
| IX_WorkOrderRouting_ProductID | Nonclustered index. | ||
| PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequence | Primary key (clustered) constraint | ![]() | ![]() |
Check Constraints
| Name | Description | Expression |
|---|---|---|
| CK_WorkOrderRouting_ActualCost | Check constraint [ActualCost] > (0.00) | ([ActualCost]>(0.00)) |
| CK_WorkOrderRouting_ActualEndDate | Check constraint [ActualEndDate] >= [ActualStartDate] OR [ActualEndDate] IS NULL OR [ActualStartDate] IS NULL | ([ActualEndDate]>=[ActualStartDate] OR [ActualEndDate] IS NULL OR [ActualStartDate] IS NULL) |
| CK_WorkOrderRouting_ActualResourceHrs | Check constraint [ActualResourceHrs] >= (0.0000) | ([ActualResourceHrs]>=(0.0000)) |
| CK_WorkOrderRouting_PlannedCost | Check constraint [PlannedCost] > (0.00) | ([PlannedCost]>(0.00)) |
| CK_WorkOrderRouting_ScheduledEndDate | Check constraint [ScheduledEndDate] >= [ScheduledStartDate] | ([ScheduledEndDate]>=[ScheduledStartDate]) |
Relationships
| Relationship | Description |
|---|---|
| FK_WorkOrderRouting_Location_LocationID | Foreign key constraint referencing Location.LocationID. |
| FK_WorkOrderRouting_WorkOrder_WorkOrderID | Foreign key constraint referencing WorkOrder.WorkOrderID. |
Objects that Production.WorkOrderRouting depends on
| Database Object | Object Type | Description | Dep Level | |
|---|---|---|---|---|
![]() | dbo.ErrorLog | Table | Audit table tracking errors in the the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH construct. | 3 |
![]() | dbo.Flag | User Defined Data Type | 3 | |
![]() | Production.Location | Table | Product inventory and manufacturing locations. | 1 |
![]() | Production.Product | Table | Products sold or used in the manfacturing of sold products. | 2 |
![]() | Production.ProductCategory | Table | High-level product categorization. | 4 |
![]() | Production.ProductModel | Table | Product model classification. | 3 |
![]() | Production.ProductSubcategory | Table | Product subcategories. See ProductCategory table. | 3 |
![]() | Production.ScrapReason | Table | Manufacturing failure reasons lookup table. | 2 |
![]() | Production.TransactionHistory | Table | Record of each purchase order, sales order, or work order transaction year to date. | 2 |
![]() | Production.UnitMeasure | Table | Unit of measure lookup table. | 3 |
![]() | dbo.uspLogError | Stored Procedure | Logs error information in the ErrorLog table about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without inserting error information. | 2 |
![]() | dbo.uspPrintError | Stored Procedure | Prints error information about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without printing any error information. | 2 |
![]() | Production.WorkOrder | Table | Manufacturing work orders. | 1 |
SQL
|
See Also




