替换字符
update alm_debt_asset set org_term_mult= (case when org_term_mult='年' then 113606 when org_term_mult='周' then 113603 when org_term_mult='月' then 113604 else 0 end) ,AMRT_TYPE_CD= (case when AMRT_TYPE_CD='部分分期等额偿还' then 108402 when AMRT_TYPE_CD='完全分期等额偿还' then 108401 else 0 end) ,PMT_FREQ_MULT= (case when PMT_FREQ_MULT='Monthly' then 114402 when PMT_FREQ_MULT='Annual' then 114405 else 0 end) ,ACCRUAL_BASIS_CD= (case when ACCRUAL_BASIS_CD='前期计入' then 100502 when ACCRUAL_BASIS_CD='当期计入' then 100501 else 0 end) ,REPRICE_FREQ_MULT= (case when REPRICE_FREQ_MULT='Monthly' then 114401 when REPRICE_FREQ_MULT='BIMONTHLY' then 114404 else 0 end) ,INT_TYPE= (case when INT_TYPE='期前' then 107601 when INT_TYPE='期末' then 107602 else 0 end) ,ADJUSTABLE_TYPE_CD= (case when ADJUSTABLE_TYPE_CD='每满一年' then 108502 when ADJUSTABLE_TYPE_CD='双方约定' then 108503 else 0 end)
替换字段类型
create table new as select * from alm_debt_asset where 1=2; alter table new modify (org_term_mult number(11),AMRT_TYPE_CD number(11),PMT_FREQ_MULT number(11),ACCRUAL_BASIS_CD number(11),REPRICE_FREQ_MULT number(11),INT_TYPE number(11),ADJUSTABLE_TYPE_CD number(11)); insert into new select * from alm_debt_asset; drop table alm_debt_asset;