oracle中decode函數,length函數,substr函數,upper函數,自己看的

update uadpt_tac_act_data set TERMINAL=UPPER(TERMINAL)


update uadpt_tac_act_data set brand=substr(brand,1,50) where length(brand) > 50

update uadpt_tac_act_data set soft_lock=decode(soft_lock,'AB卡','1','聯通解鎖助手','2','聯通解鎖助手+電信卡','3','網絡解鎖助手','4','系統升級','5',NULL,'0',soft_lock)

 update uadpt_tac_act_data set NETTYPE_UNI=decode(NETTYPE_UNI,'2g','2G','3g','3G','4g','4G',NULL,'N',NETTYPE_UNI)

update uadpt_tac_act_data set NETTYPE_OTH=UPPER(NETTYPE_OTH)


String sqltac = "update uadpt_tac_act_data set status_tac='1' where length(tac) = 8";
        // 終端類型
        String sqlterminal = "update uadpt_tac_act_data set status_terminal='1' where terminal  in ('2G','3G','4G')";
        // 品牌
        String sqlbrand = "update uadpt_tac_act_data set status_brand='1' where length(brand) <= 50";
        // 型號
        String sqlmodel = "update uadpt_tac_act_data set status_model='1' where length(model) <= 50";
        // 是否支持本網
        String sqlcmType = "update uadpt_tac_act_data set status_cm_type='1' where cm_type in ('0','1')";
        // 雙卡
        String sqldual = "update uadpt_tac_act_data set status_dual='1' where dual in ('0','1')";
        // 軟解鎖
        String sqlsoftLock = "update uadpt_tac_act_data set status_soft_lock='1' where soft_lock in ('0','1','2','3','4','5')";
        //本網最高網終類型
        String sqlnettypeUni = "update uadpt_tac_act_data set status_nettype_uni='1' where nettype_uni in ('2G','3G','4G','N')";
        //異網最高網終類型
        String sqlnettypeOth = "update uadpt_tac_act_data set status_nettype_oth='1' where nettype_oth in ('2G','3G','4G')";
       



發佈了38 篇原創文章 · 獲贊 21 · 訪問量 17萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章