ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 汉字转拼音pl/sql

汉字转拼音pl/sql

原创 Linux操作系统 作者:liuxh6 时间:2019-05-21 12:30:04 0 删除 编辑
汉字转拼音(首字母)pl/sq

CREATE OR REPLACE fuNCtion getpy( chnstr in char) return vaRCHar2 Is
pytable long;
no integer;
py varchar2 (200);
str varchar2(200);
pyi integer;
ch1 varchar2(2);
len integer;
begin
pytable:= 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
||'aaaabbbbbbbbbbbbbbbbbbbbbbbbbbbb'
||'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
||'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
||'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
||'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
||'bbbbbbbbbbbbbbbbbbbbbbbbbbbbcccc'
||'cccccccccccccccccccccccccccccccc'
||'cccccccccccccccccccccccccccccccc'
||'cccccccccccccccccccccccccccccccc'
||'cccccccccccccccccccccccccccccccc'
||'cccccccccccccccccccccccccccccccc'
||'cccccccccccccccccccccccccccccccc'
||'cccccccccccccccccccccccccccccccc'
||'cccccddddddddddddddddddddddddddd'
||'dddddddddddddddddddddddddddddddd'
||'dddddddddddddddddddddddddddddddd'
||'dddddddddddddddddddddddddddddddd'
||'dddddddddddddddddddddddddddddddd'
||'dddddddddddddddddddddddddddddeee'
||'eeeeeeeeeeeeeeeeeeefffffffffffff'
||'ffffffffffffffffffffffffffffffff'
||'ffffffffffffffffffffffffffffffff'
||'ffffffffffffffffffffffffffffffff'
||'ffffffffffffffffgggggggggggggggg'
||'gggggggggggggggggggggggggggggggg'
||'gggggggggggggggggggggggggggggggg'
||'gggggggggggggggggggggggggggggggg'
||'gggggggggggggggggggggggggggggggg'
||'ggggggggggghhhhhhhhhhhhhhhhhhhhh'
||'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'
||'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'
||'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'
||'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'
||'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'
||'jjjjjjjkkkkkkkkkkkkkkkkkkkkkkkkk'
||'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk'
||'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk'
||'kkkkkkkkkkklllllllllllllllllllll'
||'llllllllllllllllllllllllllllllll'
||'llllllllllllllllllllllllllllllll'
||'llllllllllllllllllllllllllllllll'
||'llllllllllllllllllllllllllllllll'
||'llllllllllllllllllllllllllllllll'
||'llllllllllllllllllllllllllllllll'
||'llllllllllllllllllllllllllllllll'
||'lllmmmmmmmmmmmmmmmmmmmmmmmmmmmmm'
||'mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm'
||'mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm'
||'mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm'
||'mmmmmmmmmmmmmmmmmmmmmmmmmmnnnnnn'
||'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn'
||'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn'
||'nnnnnnnnnnnooooooooppppppppppppp'
||'pppppppppppppppppppppppppppppppp'
||'pppppppppppppppppppppppppppppppp'
||'pppppppppppppppppppppppppppppppp'
||'pppppppppppppqqqqqqqqqqqqqqqqqqq'
||'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'
||'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'
||'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'
||'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'
||'qqqqqqqqqqrrrrrrrrrrrrrrrrrrrrrr'
||'rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr'
||'rrrrrsssssssssssssssssssssssssss'
||'ssssssssssssssssssssssssssssssss'
||'ssssssssssssssssssssssssssssssss'
||'ssssssssssssssssssssssssssssssss'
||'ssssssssssssssssssssssssssssssss'
||'ssssssssssssssssssssssssssssssss'
||'ssssssssssssssssssssssssssssssss'
||'ssssssssssssssssssssssssssssssss'
||'ssssssssssssssssssssssssssssssss'
||'sssttttttttttttttttttttttttttttt'
||'tttttttttttttttttttttttttttttttt'
||'tttttttttttttttttttttttttttttttt'
||'tttttttttttttttttttttttttttttttt'
||'tttttttttttttttttttttttttttttttw'
||'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'
||'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'
||'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'
||'wwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxx'
||'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
||'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
||'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
||'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
||'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
||'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
||'xxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyy'
||'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
||'yyyyyyyyy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aybnptsdkdylhgymylcxpy{jndqj'
||'wxqxfyyfjlejpzrxccqwqqsbzkymgplb'
||'mjrqcflnymyqmsqyrbcjthztqfrxqhxm'
||'jjcjlxxgjmshzkbswyemyltxfsydsgly'
||'cjqxsjnqbsctyhbftdcyzdjwyghqfrxw'
||'ckqkxebptlpxjzsrmebwhjlbjslyysmd'
||'xlclqkxlhxjrzjmfqhxhwywsbhtrxxgl'
||'hqhfnm{ykldyxzpwlgg{mtcfpajjzylj'
||'tyanjgbjplqgdzyqyaxbkysecjsznsly'
||'zhzxlzcghpxzhznytdsbcjkdlzayfmyd'
||'lebbgqyzkxgldndnyskjshdlyxbcghxy'
||'pkdqmmzngmmclgwzszxzjfznmlzzthcs'
||'ydbdllscddnlkjykjsycjlkohqasdknh'
||'csganhdaashtcplcpqybsdmpjlpzjoql'
||'cdhjjysprchn{nnlhlyyqyhwzptczgww'
||'mzffjqqqqyxaclbhkdjxdgmmydjxzlls'
||'ygxgkjrywzwyclzmssjzldbydcpcxyhl'
||'xchyzjq{{qagmnyxpfrkssbjlyxysygl'
||'nscmhswwmnzjjlxxhchsy{{ctxrycyxb'
||'yhcsmxjsznpwgpxxtaybgajcxly{dccw'
||'zocwkccsbnhcpdyznfcyytyckxkybsqk'
||'kytqqxfcwchcykelzqbsqyjqcclmthsy'
||'whmktlkjlycxwhyqqhtqh{pq{qscfymm'
||'dmgbwhwlgsllysdlmlxpthmjhwljzyhz'
||'jxhtxjlhxrswlwzjcbxmhzqxsdzpmgfc'
||'sglsxymqshxpjxwmyqksmyplrthbxftp'
||'mhyxlchlhlzylxgsssstclsltclrpbhz'
||'hxyyfhb{gdmycnqqwlqhjj{ywjzyejjd'
||'hpblqxtqkwhlchqxagtlxljxmsl{htzk'
||'zjecxjcjnmfby{sfywybjzgnysdzsqyr'
||'sljpclpwxsdwejbjcbcnaytwgmpabcly'
||'qpclzxsbnmsggfnzjjbzsfzyndxhplqk'
||'zczwalsbccjx{yzhwkypsgxfzfcdkhjg'
||'xdlqfsgdslqwzkxtmhsbgzmjzrglyjbp'
||'mlmsxlzjqshzyj{zydjwbmjklddpmjeg'
||'xyhylxhlqyqhkycwcjmyyxnatjhyccxz'
||'pcqlbzwwytwbqcmlpmyrjcccxfpznzzl'
||'jplxxyztzlgdldcklyrzzgqtgjhhgjlj'
||'axfgfjzslcfdqzlclgjdjcsnclljpjqd'
||'cclcjxmyzftsxgcgsbrzxjqqctzhgyqt'
||'jqqlzxjylylbcyamcstylpdjbyregkjz'
||'yzhlyszqlznwczcllwjqjjjkdgjzolbb'
||'zppglghtgzxyghzmycnqsycyhbhgxkam'
||'txyxnbskyzzgjzlqjdfcjxdygjqjjpmg'
||'wgjjjpkqsbgbmmcjssclpqpdxcdyyky{'
||'cjddyygywrhjrtgznyqldkljszzgzqzj'
||'gdykshpzmtlcpwnjafyzdjcnmwescygl'
||'btzcgmssllyxqsxsbsjsbbsgghfjlypm'
||'zjnlyywdqshzxtyywhmzyhywdbxbtlms'
||'yyyfsxjc{txxlhjhf{sxzqhfzmzcztqc'
||'xzxrttdjhnnyzqqmnqdmmg{ytxmjgdhc'
||'dyzbffallztdltfxmxqzdngwqdbdczjd'
||'xbzgsqqddjcmbkzffxmkdmdsyyszcmlj'
||'dsynsprskmkmpcklgdbqtfzswtfgglyp'
||'lljzhgj{gypzltcsmcnbtjbqfkthbyzg'
||'kpbbymtdssxtbnpdkleycjnyddykztdh'
||'qhsdzsctarlltkzlgecllkjlqjaqnbdk'
||'kghpjtzqksecshalqfmmgjnlyjbbtmly'
||'zxdcjpldlpcqdhzycbzsczbzmsljflkr'
||'zjsnfrgjhxpdhyjybzgdljcsezgxlblh'
||'yxtwmabchecmwyjyzlljjyhlg{djlsly'
||'gkdzpzxjyyzlwcxszfgwyydlyhcljscm'
||'bjhblyzlycblydpdqysxqzbytdkyyjy{'
||'cnrjmpdjgklcljbctbjddbblblczqrpp'
||'xjcglzcshltoljnmdddlngkaqhqhjhyk'
||'heznmshrp{qqjchgmfprxhjgdychghly'
||'rzqlcyqjnzsqtkqjymszswlcfqqqxyfg'
||'gyptqwlmcrnfkkfsyylqbmqammmyxctp'
||'shcptxxzzsmphpshmclmldqfyqxszyjd'
||'jjzzhqpdszglstjbckbxyqzjsgpsxqzq'
||'zrqtbdkyxzkhhgflbcsmdldgdzdblzyy'
||'cxnncsybzbfglzzxswmsccmqnjqsbdqs'
||'jtxxmbltxzclzshzcxrqjgjylxzfjphy'
||'{zqqydfqjjlzznzjcdgzygctxmzysctl'
||'kphtxhtlbjxjlxscdqxcbbtjfqzfsltj'
||'btkqbxxjjljchczdbzjdczjdcprnpqcj'
||'pfczlclzxzdmxmphjsgzgszzqlylwtjp'
||'fsyaxmcjbtzyycwmytcsjjlqcqlwzmal'
||'bxyfbpnlsfhtgjwejjxxglljstgshjql'
||'zfkcgnndszfdeqfhbsaqtgylbxmmygsz'
||'ldydqmjjrgbjtkgdhgkblqkbdmbylxwc'
||'xyttybkmrtjzxqjbhlmhmjjzmqasldcy'
||'xy???????????????????????????????'
||'?????????????????????????????????'
||'?????????????????????????????????'
||'?????????????????????????????????'
||'?????????????????????????????????'
||'?????????????????????????????????';
str:=chnstr;
pyi:=1;
py:='';
len:=length(str);
while pyi<=len loop
ch1:=substr(str,pyi,1);
pyi:=pyi+1;
if ascii(ch1)>=176 then
no:=ascii(ch1)-16704-162*trunc(ascii(ch1)/256);
if no>0 then
py:=py||substr(pytable,no,1);
end if;
else
if ascii(ch1)>32 and ascii(ch1)<=126 then
ch1:='';
py:=py||ch1;
end if;
end if;
end loop;
return (rtrim(py));
end;


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7104/viewspace-133872/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 检查温度脚本
请登录后发表评论 登录
全部评论

注册时间:2002-02-24

  • 博文量
    90
  • 访问量
    64512