Production.WorkOrder Table
Information
| Name | WorkOrder |
| Schema | Production |
| Row Count | 0 |
| Data Size | |
| Index Size | |
| Reserved Size | |
| Unused Size | |
| Created | 29.3.2010. 21:58:18 |
| Modified | 29.3.2010. 21:58:56 |
Extended Properties
| Name | Type | Property Name | Value |
| WorkOrder | TABLE | MS_Description | Manufacturing work orders. |
Columns
| PK | Key | Identity | Name | Data Type | Allow Nulls | Collation | References | Default | Computed | Compute Expression |
|   |   |   | WorkOrderID | int |   | | | |   | |
| |   |   | ProductID | int |   | | Production.Product.ProductID | |   | |
| |   |   | OrderQty | int |   | | | |   | |
| |   |   | StockedQty | int |   | | | |   | (isnull([OrderQty]-[ScrappedQty],(0))) |
| |   |   | ScrappedQty | smallint |   | | | |   | |
| |   |   | StartDate | datetime |   | | | |   | |
| |   |   | EndDate | datetime |   | | | |   | |
| |   |   | DueDate | datetime |   | | | |   | |
| |   |   | ScrapReasonID | smallint |   | | Production.ScrapReason.ScrapReasonID | |   | |
| |   |   | ModifiedDate | datetime |   | | | (getdate()) |   | |
Indexes
Check Constraints
Foreign Key Constraints
Triggers
| Name | Activates on | Instead Of | For Replication | Enabled | Created | Modified |
| iWorkOrder | INSERT |   |   |   | 29.3.2010. 21:58:56 | 29.3.2010. 21:58:56 |
| uWorkOrder | UPDATE |   |   |   | 29.3.2010. 21:58:56 | 29.3.2010. 21:58:56 |
SQL Script
CREATE TABLE [Production].[WorkOrder] (
[WorkOrderID] int NOT NULL IDENTITY,
[ProductID] int NOT NULL,
[OrderQty] int NOT NULL,
[StockedQty] int NOT NULL,
[ScrappedQty] smallint NOT NULL,
[StartDate] datetime NOT NULL,
[EndDate] datetime NULL,
[DueDate] datetime NOT NULL,
[ScrapReasonID] smallint NULL,
[ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);
CREATE INDEX [IX_WorkOrder_ScrapReasonID] on [Production].[WorkOrder]([ScrapReasonID]);
CREATE INDEX [IX_WorkOrder_ProductID] on [Production].[WorkOrder]([ProductID]);