小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

oracle漢字到拼音的轉(zhuǎn)換

 168一路發(fā) 2010-08-16

--注:此函數(shù)只在ZHS16GBK字符集的Oracle 9.2中通過(guò),其它平臺(tái)沒(méi)有測(cè)試,請(qǐng)根據(jù)實(shí)際需要作相應(yīng)的修改
create or replace function csound(c  in varchar2,
                                  op in integer default 1   --加上不等于1的參數(shù),則對(duì)全字符串進(jìn)行處理,支持中英文合編
                                 )
return varchar2
is
c1     varchar2(2);
c2     varchar2(2);
     integer;
n1     integer;
n2     integer;
csound varchar2(32767);
begin
    if op=1 then p:=1 ;
    else p:=length(c);
    end if;
    for i in 1..p
    loop
    c2:=substr(c,i,1);
    n1:=floor(ascii(c2)/256);
    n2:=mod(ascii(c2),256);
    if n1=0 and n2<=129 then
       c1:=c2;      
    elsif n2<>127 and n2<>255
          and not (n2 between 0 and 63)  then
       select
       case
       when c2>='丂' and c2<'芭'  then 'A'
      when c2>='芭' and c2<'擦'  then 'B'
       when c2>='擦' and c2<'搭'  then 'C'
       when c2>='搭' and c2<'蛾'  then 'D'
       when c2>='蛾' and c2<'發(fā)'  then 'E'
       when c2>='發(fā)' and c2<'噶'  then 'F'
       when c2>='噶' and c2<'哈'  then 'G'
       when c2>='哈' and c2<'擊'  then 'H'
       when c2>='擊' and c2<'喀'  then 'J'
       when c2>='喀' and c2<'垃'  then 'K'
       when c2>='垃' and c2<'媽'  then 'L'
       when c2>='媽' and c2<'拿'  then 'M'
       when c2>='拿' and c2<'哦'  then 'N'
       when c2>='哦' and c2<'啪'  then 'O'
       when c2>='啪' and c2<'期'  then 'P'
       when c2>='期' and c2<'然'  then 'Q'
       when c2>='然' and c2<'撒'  then 'R'
       when c2>='撒' and c2<'塌'  then 'S'
       when c2>='塌' and c2<'挖'  then 'T'
       when c2>='挖' and c2<'稀'  then 'W'
       when c2>='稀' and c2<'壓'  then 'X'
       when c2>='壓' and c2<'匝'  then 'Y'
       when c2>='匝' and c2<='鼱' then 'Z' end
       into c1
       from dual;
       else
       c1:='er';
       end if;
       csound:=csound||c1;
       end loop;
    return csound;
end;
select csound('我愛偉大的周星馳',2) from dual
select ascii('丂') from dual;

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多