Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check |
---|---|---|---|---|---|---|---|
WorkOrderID | int identity | int | Not null | Primary key for WorkOrder records. | |||
ProductID | int | Not null | Product identification number. Foreign key to Product.ProductID. | ||||
OrderQty | int | Not null | Product quantity to build. | ([OrderQty]>(0)) | |||
StockedQty | int | Not null | Quantity built and put in inventory. | ||||
ScrappedQty | smallint | Not null | Quantity that failed inspection. | ([ScrappedQty]>=(0)) | |||
StartDate | datetime | Not null | Work order start date. | ||||
EndDate | datetime | Null | Work order end date. | ||||
DueDate | datetime | Not null | Work order due date. | ||||
ScrapReasonID | smallint | Null | Reason for inspection failure. | ||||
ModifiedDate | datetime | getdate() | Not null | Date and time the record was last updated. |
The object has no extended properties.
Primary Key Name | Field Name |
---|---|
PK_WorkOrder_WorkOrderID | WorkOrderID |
Foreign | Primary | Key Name |
---|---|---|
WorkOrder.ProductID | Product.ProductID | FK_WorkOrder_Product_ProductID |
WorkOrder.ScrapReasonID | ScrapReason.ScrapReasonID | FK_WorkOrder_ScrapReason_ScrapReasonID |
Index Name | Description | Clustered | Unique | Fields |
---|---|---|---|---|
PK_WorkOrder_WorkOrderID | Clustered index created by a primary key constraint. | Yes | Yes | WorkOrderID |
IX_WorkOrder_ProductID | Nonclustered index. | No | No | ProductID |
IX_WorkOrder_ScrapReasonID | Nonclustered index. | No | No | ScrapReasonID |
Name | Description | Type | Enabled |
---|---|---|---|
iWorkOrder | AFTER INSERT trigger that inserts a row in the TransactionHistory table. | after Insert | Yes |
uWorkOrder | AFTER UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in the WorkOrder table. | after Update | Yes |
Object Name | Type | Field Name |
---|---|---|
Production.WorkOrder | user table | OrderQty |
Production.WorkOrder | user table | ScrappedQty |