update t_temp_rzcjb_htxh set cjje0 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.cjje0) from (select * from (select cjhm, cjje0, sjly from t_temp_rzcjb_htxh) a pivot (max(cjje0) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ', 'XJTDJS_TZ', 'XJTDZJ_TZ', 'XJYEZJ_TZ', 'XJYEJS_TZ', 'XJTDTK_TZ', 'XJTDBK_TZ', 'SGGPJS_TZ','SHGPZJ_TZ', 'ETFSG_TZ', 'ETFSH_TZ')
update t_temp_rzcjb_htxh set cjje1 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.cjje1) from (select * from (select cjhm, cjje1, sjly from t_temp_rzcjb_htxh) a pivot (max(cjje1) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ', 'XJTDJS_TZ', 'XJTDZJ_TZ', 'XJYEZJ_TZ', 'XJYEJS_TZ', 'XJTDTK_TZ', 'XJTDBK_TZ', 'SGGPJS_TZ','SHGPZJ_TZ', 'ETFSG_TZ', 'ETFSH_TZ')
update t_temp_rzcjb_htxh set jyfy11 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy11) from (select * from (select cjhm, jyfy11, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy11) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy21 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy21) from (select * from (select cjhm, jyfy21, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy21) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy31 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy31) from (select * from (select cjhm, jyfy31, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy31) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy41 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy41) from (select * from (select cjhm, jyfy41, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy41) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy42 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy42) from (select * from (select cjhm, jyfy42, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy42) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy43 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy43) from (select * from (select cjhm, jyfy43, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy43) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy44 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy44) from (select * from (select cjhm, jyfy44, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy44) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy45 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy45) from (select * from (select cjhm, jyfy45, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy45) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy81 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy81) from (select * from (select cjhm, jyfy81, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy81) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy82 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy82) from (select * from (select cjhm, jyfy82, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy82) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
update t_temp_rzcjb_htxh set jyfy83 = coalesce(v1.temp - v1.rzcjb, t_temp_rzcjb_htxh.jyfy83) from (select * from (select cjhm, jyfy83, sjly from t_temp_rzcjb_htxh) a pivot (max(jyfy83) for sjly in (temp, rzcjb)) b) v1 where t_temp_rzcjb_htxh.cjhm = v1.cjhm and t_temp_rzcjb_htxh.sjly = 'rzcjb_dvp' and t_temp_rzcjb_htxh.jsfs = '8001' and t_temp_rzcjb_htxh.ywlb not in ('LOFSG_TZ', 'LOFSH_TZ')
最新发布