• 将汉字数字字符串转换成阿拉伯数字


     1 declare
     2 
     3 str_mid varchar2(100);
     4 str_end varchar2(100);
     5 begin
     6   
     7 for j in (select t.id,t.ques_desc from  cqdn_qa_list_tmp t) 
     8   loop 
     9 for i in 1 .. length(j.ques_desc)
    10 loop
    11 
    12 case substr(j.ques_desc,i,1) 
    13   when '' then str_mid:=1 ;
    14   when '' then str_mid:=2 ;
    15   when '' then str_mid:=3 ;
    16   when '' then str_mid:=4 ;
    17   when '' then str_mid:=5 ;
    18   when '' then str_mid:=6 ;
    19   when '' then str_mid:=7 ;
    20   when '' then str_mid:=8 ;
    21   when '' then str_mid:=9 ;       
    22   when '' then str_mid:=0 ;    
    23 end case;
    24 
    25 str_end:=str_end||str_mid;
    26 end loop;
    27 
    28 dbms_output.put_line(str_end);
    29 
    30 update cqdn_qa_list_tmp t set t.ques_desc = str_end  where t.id = j.id;
    31 commit;
    32 str_end:=null;
    33 end loop;
    34 end;
    欢迎对it热情的同学,加qq进行技术讨论; QQ:850922253
  • 相关阅读:
    python RabbitMQ队列/redis
    python 协程
    Python 线程
    Python Socket网络编程
    Python 面向对象编程进阶
    Python 面向对象
    python 模块
    Python 迭代器&生成器&装饰器
    Python 集合操作
    Java多态--构造方法的内部方法多态
  • 原文地址:https://www.cnblogs.com/zhangwensi/p/7211801.html
Copyright © 2020-2023  润新知