搜索
首页 电脑/网络 软件 系统软件

oracle获取汉字拼音和拼音首字母方法是什么呢?

oracle获取汉字拼音和拼音首字母方法是什么呢?

全部回答

2017-07-27

65 0
    最近请DBA美女帮忙找获取汉字拼音的ORACLE的函数。终于找到一个,参考了如下BLOG。 http://hanjs。itpub。net/category/28217/44772 执行的效果就是 select name,f_getspell(name),f_getspell(name,1) from roles 得到结果: 后台管理 htgl houtaiguanli 嘿嘿,完全符合了项目要求。
    只是要注意,里面的lv和luo,nv和nuo有时不分,要做处理。
     建立函数的脚本清单如下: create or replace type spell_code as object(spell varchar2 (10),code number); create or replace type t_spellcode is table of spell_code; create or replace function f_getSpellcode return t_spellcode Pipelined is Begin PIPE Row(spell_code('a', -20319)); PIPE Row(spell_code('ai', -20317)); PIPE Row(spell_code('an', -20304)); PIPE Row(spell_code('ang', -20295)); PIPE Row(spell_code('ao', -20292)); PIPE Row(spell_code('ba', -20283)); PIPE Row(spell_code('bai', -20265)); PIPE Row(spell_code('ban', -20257)); PIPE Row(spell_code('bang', -20242)); PIPE Row(spell_code('bao', -20230)); PIPE Row(spell_code('bei', -20051)); PIPE Row(spell_code('ben', -20036)); PIPE Row(spell_code('beng', -20032)); PIPE Row(spell_code('bi', -20026)); PIPE Row(spell_code('bian', -20002)); PIPE Row(spell_code('biao', -19990)); PIPE Row(spell_code('bie', -19986)); PIPE Row(spell_code('bin', -19982)); PIPE Row(spell_code('bing', -19976)); PIPE Row(spell_code('bo', -19805)); PIPE Row(spell_code('bu', -19784)); PIPE Row(spell_code('ca', -19775)); PIPE Row(spell_code('cai', -19774)); PIPE Row(spell_code('can', -19763)); PIPE Row(spell_code('cang', -19756)); PIPE Row(spell_code('cao', -19751)); PIPE Row(spell_code('ce', -19746));。

类似问题换一批

热点推荐

热度TOP

相关推荐
加载中...

热点搜索 换一换

电脑/网络
系统软件
程序设计
电脑装机
操作系统/系统故障
硬件
笔记本电脑
百度
互联网
反病毒
软件
软件
系统软件
多媒体软件
办公软件
网络软件
图像处理软件
系统软件
系统软件
举报
举报原因(必选):
取消确定举报