运维

/ 0条评论 / 0 个点赞 / 875人阅读
select concat("update t_b_culres_cul_mv  set CUL_YEAR='",typecode,"'"," where CUL_YEAR='",typename,"';") 
from t_s_type where typegroupid='A0361';

select concat("update t_b_culres_cul_mv  set cul_level='",typecode,"'"," where cul_level='",typename,"';") 
from t_s_type where typegroupid='wwjb';

select concat("update t_b_culres_cul_mv  set cul_category='",typecode,"'"," where cul_category='",typename,"';") 
from t_s_type where typegroupid='A0211';

select concat("update t_b_culres_cul_mv  set source='",typecode,"'"," where source='",typename,"';") 
from t_s_type where typegroupid='B0161';

select concat("update t_b_culres_cul_mv  set endresiduelevel='",typecode,"'"," where endresiduelevel='",typename,"';") 
from t_s_type where typegroupid='A1061';

select concat("update t_b_culres_cul_mv  set texturecategory='",typecode,"'"," where texturecategory='",typename,"';") 
from t_s_type where typegroupid='A0601';


select concat("update t_b_culres_cul_nomv  set punit_class='",typecode,"'"," where punit_class='",typename,"';") 
from t_s_type where typegroupid='32312312321';

select concat("update t_b_culres_cul_nomv  set punit_class_detail='",typecode,"'"," where punit_class_detail='",typename,"';") 
from t_s_type where typegroupid='32312312321';


select concat("update t_b_culres_gs_third  set CATEGORY='",typecode,"'"," where CATEGORY='",typename,"';") 
from t_s_type where typegroupid='32312312321';

select concat("update t_b_culres_gs_third  set STATISTICAL_ERA='",typecode,"'"," where STATISTICAL_ERA='",typename,"';") 
from t_s_type where typegroupid='f852d85d47ed64a40147ed70894c0';

select concat("update t_b_culres_gs_third  set TEMP2='",typecode,"'"," where TEMP2='",typename,"';") 
from t_s_type where typegroupid='32312312321';

select concat("update t_b_culres_gs_first  set STORAGESTATE='",typecode,"'"," where TEMP2='",typename,"';") 
from t_s_type where typegroupid='402881f36e874c11016e87638fe5001e';

select concat("update t_b_culres_gs_third  set LEVEL_='",typecode,"'"," where LEVEL_='",typename,"';") 
from t_s_type where typegroupid='40289fbd7154663e017181066aac0084';

select concat("update t_b_culres_cul_nomv  set age='",typecode,"'"," where age='",typename,"';") 
from t_s_type where typegroupid='f852d85d47ed64a40147ed70894c0';
select concat("update t_b_culres_cul_nomv  set county='",typecode,"'"," where county='",typename,"';") 
from t_s_type where typegroupid='4028816084d17aaf0184d18085c70007';
select concat("update t_b_culres_cul_nomv  set city='",typecode,"'"," where city='",typename,"';") 
from t_s_type where typegroupid='4028816084d17aaf0184d18009550005';

select concat("update t_b_culres_unit_coll_nb set NB_X_CODE='",typecode,"'"," where NB_X_NAME='",typename,"';") 
from t_s_type where typegroupid='4028816084d17aaf0184d18085c70007';
select concat("update t_b_culres_unit_coll_nb  set NB_SS_CODE='",typecode,"'"," where NB_SS_NAME='",typename,"';") 
from t_s_type where typegroupid='4028816084d17aaf0184d18009550005';

select concat("update t_b_culres_unit_coll_nb  set NB_MFKF='",typecode,"'"," where NB_MFKF='",typename,"';") 
from t_s_type where typegroupid='402881e6482c62c901482ca187ea0009';

select concat("update t_b_culres_unit_coll_nb  set NB_FRLX_CODE='",typecode,"'"," where NB_FRLX_NAME='",typename,"';") 
from t_s_type where typegroupid='frlx';


select concat("update t_b_culres_unit_coll_nb  set NB_ZLDJ_CODE='",typecode,"'"," where NB_ZLDJ_NAME='",typename,"';") 
from t_s_type where typegroupid='2c9135b28bd0e59b018bd234ac2e0012';

select concat("update t_b_culres_unit_coll_nb  set NB_LSCJ_CODE='",typecode,"'"," where NB_LSCJ_NAME='",typename,"';") 
from t_s_type where typegroupid='LSCJ';

select concat("update t_b_culres_unit_coll_nb  set NB_SYZFG='",typecode,"'"," where NB_SYZFG='",typename,"';") 
from t_s_type where typegroupid='402881e6482c62c901482ca187ea0009';

select concat("update t_b_culres_unit_coll_nb  set NB_SFNRBZMD='",typecode,"'"," where NB_SFNRBZMD='",typename,"';") 
from t_s_type where typegroupid='402881e6482c62c901482ca187ea0009';

select concat("update t_b_culres_unit_coll_nb  set NB_SFJBKYDWWXFZZ='",typecode,"'"," where NB_SFJBKYDWWXFZZ='",typename,"';") 
from t_s_type where typegroupid='402881e6482c62c901482ca187ea0009';


select concat("update t_b_culres_unit_coll_nb  set NB_GSCQXZ='",typecode,"'"," where NB_GSCQXZ='",typename,"';") 
from t_s_type where typegroupid='GSCQXZ';

select concat("update t_b_culres_unit_coll_nb  set NB_GSCQXZ='",typecode,"'"," where NB_GSCQXZ='",typename,"';") 
from t_s_type where typegroupid='GSCQXZ';

select concat("update t_b_sks_cul_main  set CUL_YEAR='",typecode,"'"," where CUL_YEAR='",typename,"';") 
from t_s_type where typegroupid='2c9135b28befbfef018bf21e4b1000d5';

select concat("update t_b_sks_cul_main  set CUL_CATEGORY='",typecode,"'"," where CUL_CATEGORY='",typename,"';") 
from t_s_type where typegroupid='2c9135b28befbfef018bf221e8c400eb';

select concat("update t_b_sks_cul_main  set cul_level='",typecode,"'"," where cul_level='",typename,"';") 
from t_s_type where typegroupid='2c9135b28befbfef018bf21c1def00c9';

select concat("update t_b_culres_gs_first  set temp11='",typecode,"'"," where temp11='",typename,"';") 
from t_s_type where typegroupid='f852d85d47ed64a4014708';

更新语句

update t_b_culres_cul_mv set ACTUALQTY=replace(ACTUALQTY,'.0','');
update t_b_culres_gs_first set ACTUALQTY=replace(ACTUALQTY,'.0','');
//更新收藏单位id
update t_b_culres_gs_first300 mv set mv.UNIT_ID=(select nb.id from t_b_culres_unit_coll_nb nb where nb.UNIT_CODE = mv.UNIT_ID);
update t_b_culres_cul_mv300 mv set mv.UNIT_ID=(select nb.id from t_b_culres_unit_coll_nb nb where nb.UNIT_CODE = mv.UNIT_ID);

update t_b_culres_gs_first set org_id_province=SJXZQHDM,org_id_city=DSXZQHDM,org_id_county=QXXZQHDM ;

update t_b_culres_cul_mv set org_id_province=SJXZQHDM,org_id_city=DSXZQHDM,org_id_county=QXXZQHDM,
kydgmww_s_code=SJXZQHDM,kydgmww_ss_code=DSXZQHDM,kydgmww_x_code=QXXZQHDM where kydgmww_s_code is null 
and kydgmww_ss_code is null and kydgmww_x_code is null;
//更新题材类型是革命纪念的数据为革命文物
update t_b_culres_cul_mv300 set is_gm='1' where UNIT_ID in (select id from t_b_culres_unit_coll_nb where NB_TCLX_CODE='3')