日期:2014-05-17 浏览次数:20599 次
CREATE TABLE ats_test
(
empcode NVARCHAR(40),
Day_01 NVARCHAR(10),
Day_02 NVARCHAR(10),
Day_03 NVARCHAR(10),
Day_04 NVARCHAR(10),
Day_05 NVARCHAR(10),
Day_06 NVARCHAR(10),
Day_07 NVARCHAR(10),
Day_08 NVARCHAR(10),
Day_09 NVARCHAR(10),
Day_10 NVARCHAR(10)
)
insert into ats_test values ('EAA45463','N4/D2/S2','N4/D2/S2','L7.5','N7.5','N7.5','N7.5','N7.5','N7.5','N7.5','N7.5')
insert into ats_test values ('EAA81137','X','L8','L8','N7.5','N7.5','N7.5','X','X','X','N6.5')
期望处理前样子:
empcode | Day_01 | Day_02 | Day_03 | Day_04 | Day_05 | Day_06 | Day_07 | Day_08 | Day_09 | Day_10
EAA45463 | N4/D2/S2 | N4/D2/S2 | L7.5 | N7.5 | N7.5 | N7.5 | N7.5 | N7.5 | N7.5 | N7.5
EAA81137 | X | L8 | L8 | N7.5 | N7.5 | N7.5 | X | X | X | N6.5
处理后样子:
empcode | D | L | N | S | X
EAA45463 | 4 | 7.5 | 60.5 | 4 | 0
CREATE TABLE ats_test
(
empcode NVARCHAR(40),
Day_01 NVARCHAR(10),
Day_02 NVARCHAR(10),
Day_03 NVARCHAR(10),
Day_04