我有一张这样的表
Id ProductionLineCode JobCode ProductionHour TargetEfficiency
211572 000001 J0000013856 1 40.00
211683 000001 J0000013856 2 40.00
211859 000001 J0000013856 4 40.00
211574 000002 J0000014107(C) 1 0.00
211688 000002 J0000014107(C) 2 0.00
211776 000002 J0000014107(C) 3 0.00
211861 000002 J0000014107(C) 4 0.00
但我想要这样的输出 -
ID ProductionLineCode JobCode Hours TargetEfficiency
211572 000001 J0000013856 1 40.00
211683 000001 J0000013856 2 40.00
0 000001 J0000013856 3 NULL
211859 000001 J0000013856 4 40.00
0 000001 J0000013856 6 NULL
0 000001 J0000013856 7 NULL
0 000001 J0000013856 8 NULL
0 000001 J0000013856 9 NULL
0 000001 J0000013856 10 NULL
0 000001 J0000013856 11 NULL
0 000001 J0000013856 12 NULL
0 000001 J0000013856 13 NULL
0 000001 J0000013856 14 NULL
0 000001 J0000013856 15 NULL
0 000001 J0000013856 16 NULL
表示小时数应为16行,其余值对于非现有值为空。
如果没有加入,怎么办呢?