# Table: WorkOrderRouting

## Properties

Property | Value
--- | ---
Name | WorkOrderRouting
ID | 670625432
Owner | dbo
Schema | Production
Filegroup | PRIMARY
Data Size (KB) | 5544 KB
Index Size (KB) | 912 KB
Rows | 67131
Unused (KB) | 152 KB
ANSI Null On |
Quoted Identifier |
Lock Escalation | TABLE
Lock On Bulk Load |
Lob Data Space |
Filestream Data Space ID |
Has Unchecked Assembly Data |
Text In Row Limit (bytes) | Option not set
Large Value Types Out Of Row |
FullText Change Tracking On |
Tracked By Cdc |
Published |
Schema Published |
Replicated |
Replication Filter |
Merge Published |
Sync Tran Subscribed |
MS Shipped |
Modify Date | 8/8/2010 5:23:43 PM
Create Date | 8/8/2010 5:21:54 PM

## Extended Properties

Name | Value
--- | ---
MS_Description | Work order details.

## Columns

Column ID | Column Name | Datatype | Nullable | Is Sparse | Is Column Set
--- | --- | --- | --- | --- | ---
1 | WorkOrderID | int |  |  |
2 | ProductID | int |  |  |
3 | OperationSequence | smallint |  |  |
4 | LocationID | smallint |  |  |
5 | ScheduledStartDate | datetime |  |  |
6 | ScheduledEndDate | datetime |  |  |
7 | ActualStartDate | datetime |  |  |
8 | ActualEndDate | datetime |  |  |
9 | ActualResourceHrs | decimal(9,4) |  |  |
10 | PlannedCost | money |  |  |
11 | ActualCost | money |  |  |
12 | ModifiedDate | datetime |  |  |

## Identity Columns

No identity columns defined.

## Primary Key Constraints

Name | Is System Named | Extended Property Name | Extended Property Value
--- | --- | --- | ---
PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequence |  | MS_Description | Primary key (clustered) constraint

## Primary Key Columns

Name
WorkOrderID
ProductID
OperationSequence

## Foreign Keys

Name | Referenced Object | Update Action | Delete Action
--- | --- | --- | ---
FK_WorkOrderRouting_Location_LocationID | Production.Location | No action | No action
FK_WorkOrderRouting_WorkOrder_WorkOrderID | Production.WorkOrder | No action | No action

## Column Level Check Constraints

Name | Column ID | Column | Definition | Is Disabled | Is Not For Replication | Is Not Trusted | Uses Database Collation | Is System Named
--- | --- | --- | --- | --- | --- | --- | --- | ---
CK_WorkOrderRouting_ActualResourceHrs | 9 | ActualResourceHrs | ([ActualResourceHrs]>=(0.0000)) |  |  |  |  |
CK_WorkOrderRouting_PlannedCost | 10 | PlannedCost | ([PlannedCost]>(0.00)) |  |  |  |  |
CK_WorkOrderRouting_ActualCost | 11 | ActualCost | ([ActualCost]>(0.00)) |  |  |  |  |

## Table Level Check Constraints

Name | Definition | Is Disabled | Is Not For Replication | Is Not Trusted | Uses Database Collation | Is System Named
--- | --- | --- | --- | --- | --- | ---
CK_WorkOrderRouting_ScheduledEndDate | ([ScheduledEndDate]>=[ScheduledStartDate]) |  |  |  |  |
CK_WorkOrderRouting_ActualEndDate | ([ActualEndDate]>=[ActualStartDate] OR [ActualEndDate] IS NULL OR [ActualStartDate] IS NULL) |  |  |  |  |

## Default Constraints

Name | Column | Definition | Is System Named | Extended Property Name | Extended Property Value
--- | --- | --- | --- | --- | ---
DF_WorkOrderRouting_ModifiedDate | ModifiedDate | (getdate()) |  | MS_Description | Default constraint value of GETDATE()

## Indexes

Name | Index Type | Primary Key | Unique | Unique Constraint | Ignore Duplicate Key | Disabled
--- | --- | --- | --- | --- | --- | ---
PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequence | CLUSTERED |  |  |  |  |
IX_WorkOrderRouting_ProductID | NONCLUSTERED |  |  |  |  |

## FullText Indexes

No fulltext indexes defined.

## Referencing Tables

No referencing tables defined.

## Object Level Permissions

No object level permissions defined.

## Column Level Permissions

No explicit column permissions granted to this object

## Statistics

### Detailed Statistics General

Name | Updated | Rows | Rows Sampled | Steps | Density | Average Key Length | String Index | Filter Expression | Unfiltered Rows
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
PK_WorkOrderRouting_WorkOrderID_ProductID_OperationSequence | Aug 8 2010 5:23PM | 67131 | 67131 | 78 | 0.6371887 | 10 |  |  | 67131

### Detailed Statistics Density

All Density | Average Length | Columns
--- | --- | ---
2.346041E-05 | 4 | WorkOrderID
2.346041E-05 | 8 | WorkOrderID, ProductID
1.489625E-05 | 10 | WorkOrderID, ProductID, OperationSequence

### Detailed Statistics Histogram

Range High Key | Range Rows | Estimated Rows | Distinct Range Rows | Avg Range Rows
--- | --- | --- | --- | ---
13 | 0 | 6 | 0 | 1
452 | 332 | 3 | 225 | 1.475556
863 | 281 | 6 | 197 | 1.426396
1670 | 621 | 6 | 414 | 1.5
1961 | 197 | 6 | 136 | 1.448529
2572 | 458 | 6 | 302 | 1.516556
3294 | 504 | 6 | 352 | 1.431818
3672 | 242 | 6 | 172 | 1.406977
4953 | 933 | 6 | 641 | 1.455538
5235 | 222 | 6 | 152 | 1.460526
7745 | 1891 | 6 | 1283 | 1.473889
8033 | 231 | 6 | 149 | 1.550336
9061 | 770 | 6 | 521 | 1.477927
9125 | 44 | 6 | 35 | 1.257143
9588 | 368 | 6 | 240 | 1.533333
10206 | 424 | 6 | 301 | 1.408638
11041 | 651 | 6 | 438 | 1.486301
11332 | 202 | 6 | 144 | 1.402778
11708 | 238 | 6 | 172 | 1.383721
15862 | 3236 | 6 | 2171 | 1.490557
16226 | 349 | 6 | 208 | 1.677885
18638 | 2016 | 6 | 1318 | 1.52959
18814 | 162 | 6 | 103 | 1.572816
19390 | 491 | 6 | 326 | 1.506135
19813 | 358 | 6 | 217 | 1.64977
20970 | 987 | 6 | 653 | 1.511485
21260 | 255 | 2 | 151 | 1.688742
21901 | 547 | 6 | 351 | 1.558405
22730 | 773 | 1 | 474 | 1.630802
24212 | 1280 | 6 | 835 | 1.532934
24924 | 686 | 6 | 410 | 1.673171
25777 | 767 | 3 | 488 | 1.571721
26069 | 255 | 1 | 172 | 1.482558
26745 | 646 | 3 | 378 | 1.708995
28851 | 1929 | 1 | 1195 | 1.614226
29315 | 395 | 1 | 255 | 1.54902
29714 | 394 | 6 | 232 | 1.698276
30588 | 806 | 6 | 501 | 1.608782
32374 | 1590 | 6 | 1007 | 1.578947
32768 | 327 | 6 | 213 | 1.535211
33783 | 1038 | 6 | 614 | 1.690554
35203 | 1287 | 6 | 810 | 1.588889
36224 | 1015 | 6 | 613 | 1.655791
36385 | 128 | 6 | 86 | 1.488372
36903 | 510 | 3 | 306 | 1.666667
37044 | 128 | 6 | 85 | 1.505882
37760 | 766 | 3 | 461 | 1.661605
37927 | 149 | 6 | 102 | 1.460784
39328 | 1409 | 1 | 891 | 1.581369
39820 | 511 | 1 | 295 | 1.732203
43918 | 4106 | 2 | 2590 | 1.585328
44396 | 511 | 3 | 313 | 1.632588
44920 | 517 | 6 | 314 | 1.646497
45192 | 269 | 6 | 175 | 1.537143
45419 | 256 | 3 | 148 | 1.72973
48355 | 2942 | 6 | 1862 | 1.580022
50264 | 1918 | 6 | 1221 | 1.570844
50647 | 382 | 2 | 223 | 1.713004
50931 | 274 | 6 | 184 | 1.48913
51929 | 1005 | 1 | 629 | 1.597774
52268 | 335 | 6 | 225 | 1.488889
55692 | 3455 | 3 | 2175 | 1.588506
55961 | 250 | 6 | 170 | 1.470588
57494 | 1538 | 1 | 962 | 1.598753
59711 | 2304 | 1 | 1431 | 1.610063
60113 | 383 | 2 | 236 | 1.622881
60513 | 383 | 1 | 260 | 1.473077
61239 | 767 | 1 | 466 | 1.645923
62021 | 767 | 2 | 497 | 1.54326
62746 | 774 | 3 | 466 | 1.660944
63960 | 1162 | 6 | 749 | 1.551402
64311 | 381 | 6 | 231 | 1.649351
65138 | 800 | 6 | 520 | 1.538462
65883 | 767 | 6 | 479 | 1.601253
71795 | 5969 | 6 | 3734 | 1.598554
72210 | 391 | 6 | 260 | 1.503846
72586 | 368 | 2 | 232 | 1.586207
72587 | 0 | 2 | 0 | 1

### Detailed Statistics General

Name | Updated | Rows | Rows Sampled | Steps | Density | Average Key Length | String Index | Filter Expression | Unfiltered Rows
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
IX_WorkOrderRouting_ProductID | Aug 8 2010 5:23PM | 67131 | 67131 | 138 | 0.01743265 | 10 |  |  | 67131

### Detailed Statistics Density

All Density | Average Length | Columns
--- | --- | ---
0.006711409 | 4 | ProductID
2.346041E-05 | 8 | ProductID, WorkOrderID
1.489625E-05 | 10 | ProductID, WorkOrderID, OperationSequence

### Detailed Statistics Histogram

Range High Key | Range Rows | Estimated Rows | Distinct Range Rows | Avg Range Rows
--- | --- | --- | --- | ---
514 | 0 | 652 | 0 | 1
515 | 0 | 24 | 0 | 1
516 | 0 | 1852 | 0 | 1
517 | 0 | 1630 | 0 | 1
518 | 0 | 1204 | 0 | 1
519 | 0 | 2026 | 0 | 1
520 | 0 | 560 | 0 | 1
521 | 0 | 458 | 0 | 1
522 | 0 | 686 | 0 | 1
747 | 0 | 2802 | 0 | 1
748 | 0 | 2874 | 0 | 1
749 | 0 | 219 | 0 | 1
750 | 0 | 206 | 0 | 1
751 | 0 | 227 | 0 | 1
752 | 0 | 206 | 0 | 1
753 | 0 | 203 | 0 | 1
755 | 12 | 12 | 1 | 12
756 | 0 | 12 | 0 | 1
757 | 0 | 9 | 0 | 1
758 | 0 | 12 | 0 | 1
759 | 0 | 86 | 0 | 1
760 | 0 | 79 | 0 | 1
761 | 0 | 101 | 0 | 1
762 | 0 | 90 | 0 | 1
763 | 0 | 99 | 0 | 1
764 | 0 | 80 | 0 | 1
766 | 94 | 94 | 1 | 94
768 | 81 | 81 | 1 | 81
769 | 0 | 76 | 0 | 1
770 | 0 | 108 | 0 | 1
771 | 0 | 53 | 0 | 1
772 | 0 | 50 | 0 | 1
773 | 0 | 54 | 0 | 1
774 | 0 | 45 | 0 | 1
775 | 0 | 56 | 0 | 1
776 | 0 | 51 | 0 | 1
778 | 63 | 64 | 1 | 63
779 | 0 | 390 | 0 | 1
780 | 0 | 384 | 0 | 1
781 | 0 | 376 | 0 | 1
782 | 0 | 377 | 0 | 1
783 | 0 | 398 | 0 | 1
784 | 0 | 403 | 0 | 1
786 | 12 | 12 | 1 | 12
788 | 12 | 12 | 1 | 12
789 | 0 | 127 | 0 | 1
790 | 0 | 137 | 0 | 1
791 | 0 | 117 | 0 | 1
792 | 0 | 253 | 0 | 1
793 | 0 | 242 | 0 | 1
794 | 0 | 250 | 0 | 1
795 | 0 | 276 | 0 | 1
796 | 0 | 245 | 0 | 1
797 | 0 | 240 | 0 | 1
798 | 0 | 225 | 0 | 1
799 | 0 | 249 | 0 | 1
800 | 0 | 235 | 0 | 1
801 | 0 | 225 | 0 | 1
802 | 0 | 1664 | 0 | 1
803 | 0 | 1206 | 0 | 1
804 | 0 | 2208 | 0 | 1
805 | 0 | 370 | 0 | 1
806 | 0 | 925 | 0 | 1
807 | 0 | 716 | 0 | 1
808 | 0 | 1050 | 0 | 1
809 | 0 | 108 | 0 | 1
810 | 0 | 2832 | 0 | 1
811 | 0 | 2463 | 0 | 1
812 | 0 | 1806 | 0 | 1
813 | 0 | 3093 | 0 | 1
814 | 0 | 144 | 0 | 1
815 | 0 | 338 | 0 | 1
816 | 0 | 707 | 0 | 1
817 | 0 | 237 | 0 | 1
818 | 0 | 815 | 0 | 1
819 | 0 | 612 | 0 | 1
820 | 0 | 1025 | 0 | 1
821 | 0 | 365 | 0 | 1
822 | 0 | 1590 | 0 | 1
823 | 0 | 335 | 0 | 1
824 | 0 | 711 | 0 | 1
825 | 0 | 240 | 0 | 1
826 | 0 | 829 | 0 | 1
827 | 0 | 605 | 0 | 1
828 | 0 | 1017 | 0 | 1
829 | 0 | 365 | 0 | 1
894 | 0 | 1102 | 0 | 1
942 | 0 | 798 | 0 | 1
943 | 0 | 360 | 0 | 1
944 | 0 | 372 | 0 | 1
945 | 0 | 2210 | 0 | 1
946 | 0 | 849 | 0 | 1
947 | 0 | 1098 | 0 | 1
949 | 0 | 376 | 0 | 1
950 | 0 | 916 | 0 | 1
951 | 0 | 716 | 0 | 1
953 | 0 | 83 | 0 | 1
954 | 0 | 143 | 0 | 1
955 | 0 | 134 | 0 | 1
956 | 0 | 132 | 0 | 1
957 | 0 | 131 | 0 | 1
959 | 63 | 65 | 1 | 63
960 | 0 | 67 | 0 | 1
962 | 62 | 63 | 1 | 62
963 | 0 | 56 | 0 | 1
964 | 0 | 50 | 0 | 1
965 | 0 | 57 | 0 | 1
966 | 0 | 134 | 0 | 1
967 | 0 | 139 | 0 | 1
968 | 0 | 130 | 0 | 1
969 | 0 | 131 | 0 | 1
970 | 0 | 89 | 0 | 1
971 | 0 | 101 | 0 | 1
972 | 0 | 88 | 0 | 1
973 | 0 | 181 | 0 | 1
974 | 0 | 165 | 0 | 1
975 | 0 | 165 | 0 | 1
976 | 0 | 174 | 0 | 1
977 | 0 | 225 | 0 | 1
978 | 0 | 60 | 0 | 1
979 | 0 | 53 | 0 | 1
980 | 0 | 131 | 0 | 1
982 | 118 | 123 | 1 | 118
983 | 0 | 122 | 0 | 1
984 | 0 | 50 | 0 | 1
985 | 0 | 55 | 0 | 1
986 | 0 | 49 | 0 | 1
988 | 56 | 55 | 1 | 56
990 | 58 | 58 | 1 | 58
991 | 0 | 59 | 0 | 1
992 | 0 | 67 | 0 | 1
993 | 0 | 51 | 0 | 1
994 | 0 | 878 | 0 | 1
995 | 0 | 710 | 0 | 1
996 | 0 | 1084 | 0 | 1
997 | 0 | 236 | 0 | 1
998 | 0 | 236 | 0 | 1
999 | 0 | 233 | 0 | 1

### Detailed Statistics General

Name | Updated | Rows | Rows Sampled | Steps | Density | Average Key Length | String Index | Filter Expression | Unfiltered Rows
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
_WA_Sys_00000004_27F8EE98 | Aug 8 2010 5:23PM | 67131 | 67131 | 7 | 0 | 2 |  |  | 67131

### Detailed Statistics Density

All Density | Average Length | Columns
--- | --- | ---
0.1428571 | 2 | LocationID

### Detailed Statistics Histogram

Range High Key | Range Rows | Estimated Rows | Distinct Range Rows | Avg Range Rows
--- | --- | --- | --- | ---
10 | 0 | 9567 | 0 | 1
20 | 0 | 5923 | 0 | 1
30 | 0 | 1490 | 0 | 1
40 | 0 | 816 | 0 | 1
45 | 0 | 674 | 0 | 1
50 | 0 | 30107 | 0 | 1
60 | 0 | 18554 | 0 | 1

## Objects that depend on [WorkOrderRouting]

- Production.WorkOrderRouting

## Objects on which [WorkOrderRouting] depends

- Production.WorkOrderRouting
  - Production.WorkOrder
    - Production.TransactionHistory
      - Production.Product
        - Production.ProductSubcategory
          - Production.ProductCategory
            - dbo.Name
        - Production.UnitMeasure
        - Production.ProductModel
          - Production.ManuInstructionsSchemaCollection
          - Production.ProductDescriptionSchemaCollection
        - dbo.Flag
      - datePS
        - dataPF1
    - Production.ScrapReason
    - dbo.uspLogError
      - dbo.ErrorLog
      - dbo.uspPrintError
  - Production.Location

## SQL

Script
SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON CREATE TABLE [Production].[WorkOrderRouting]( [WorkOrderID] [int] NOT NULL, [ProductID] [int] NOT NULL, [OperationSequence] [smallint] NOT NULL, [LocationID] [smallint] NOT NULL, [ScheduledStartDate] [datetime] NOT NULL, [ScheduledEndDate] [datetime] NOT NULL, [ActualStartDate] [datetime] NULL, [ActualEndDate] [datetime] NULL, [ActualResourceHrs] [decimal](9, 4) NULL, [PlannedCost] [money] NOT NULL, [ActualCost] [money] NULL, [ModifiedDate] [datetime] NOT NULL ) ON [PRIMARY] EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Primary key. Foreign key to WorkOrder.WorkOrderID.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'WorkOrderID' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Primary key. Foreign key to Product.ProductID.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'ProductID' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Primary key. Indicates the manufacturing process sequence.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'OperationSequence' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Manufacturing location where the part is processed. Foreign key to Location.LocationID.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'LocationID' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Planned manufacturing start date.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'ScheduledStartDate' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Planned manufacturing end date.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'ScheduledEndDate' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Actual start date.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'ActualStartDate' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Actual end date.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'ActualEndDate' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Number of manufacturing hours used.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'ActualResourceHrs' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Estimated manufacturing cost.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'PlannedCost' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Actual manufacturing cost.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'ActualCost' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date and time the record was last updated.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting', @level2type=N'COLUMN',@level2name=N'ModifiedDate' EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Work order details.' , @level0type=N'SCHEMA',@level0name=N'Production', @level1type=N'TABLE',@level1name=N'WorkOrderRouting'

#### See also

List of Tables