oracle資料庫中漢字轉化成拼音
select FN_GETPY('漢字',1) from dual; --HANZI
select FN_GETPY('漢字',2) from dual; --HanZi
select FN_GETPY('漢字',3) from dual;--hz
select FN_GETPY('漢字',4) from dual;--HZ
select FN_GETPY('漢字',5) from dual;--hanzi
================================
CREATE OR REPLACE FUNCTION fn_getpy (p_str IN VARCHAR2,
p_flag NUMBER DEFAULT NULL)
RETURN VARCHAR2
AS
v_compare VARCHAR2 (4);
v_return VARCHAR2 (4000);
v_length INT := 0;
v_substr VARCHAR2 (4);
FUNCTION fn_nlssort (p_word IN VARCHAR2)
RETURN VARCHAR2
AS
BEGIN
RETURN SUBSTR (NLSSORT (p_word, 'nls_sort=schinese_pinyin_m'), 1, 4);
END fn_nlssort;
BEGIN
IF p_str IS NULL
THEN
RETURN '';
END IF;
v_length := LENGTH (p_str);
CASE p_flag
WHEN 1
THEN --全拼大寫
FOR i IN 1 .. v_length
LOOP
v_substr := SUBSTR (p_str, i, 1);
v_compare := fn_nlssort (v_substr);
CASE
WHEN v_compare BETWEEN '3B29' AND '3B30'
THEN
v_return := v_return || 'A';
WHEN v_compare = '3B31'
THEN
v_return := v_return || 'AES';
WHEN v_compare BETWEEN '3B32' AND '3B9E'
THEN
v_return := v_return || 'AI';
WHEN v_compare BETWEEN '3BA0' AND '3BFE'
THEN
v_return := v_return || 'AN';
WHEN v_compare BETWEEN '3C01' AND '3C14'
THEN
v_return := v_return || 'ANG';
WHEN v_compare BETWEEN '3C15' AND '3C82'
THEN
v_return := v_return || 'AO';
WHEN v_compare BETWEEN '3C84' AND '3CE9'
THEN
v_return := v_return || 'BA';
WHEN v_compare BETWEEN '3CED' AND '3D1D'
THEN
v_return := v_return || 'BAI';
WHEN v_compare BETWEEN '3D20' AND '3D64'
THEN
v_return := v_return || 'BAN';
WHEN v_compare BETWEEN '3D66' AND '3DA2'
THEN
v_return := v_return || 'BANG';
WHEN v_compare BETWEEN '3DA4' AND '3E10'
THEN
v_return := v_return || 'BAO';
WHEN v_compare = '3E11'
THEN
v_return := v_return || 'BE';
WHEN v_compare BETWEEN '3E12' AND '3E7A'
THEN
v_return := v_return || 'BEI';
WHEN v_compare BETWEEN '3E7C' AND '3EA0'
THEN
v_return := v_return || 'BEN';
WHEN v_compare BETWEEN '3EA1' AND '3ED5'
THEN
v_return := v_return || 'BENG';
WHEN v_compare BETWEEN '3ED8' AND '3FE9'
THEN
v_return := v_return || 'BI';
WHEN v_compare BETWEEN '3FEA' AND '4055'
THEN
v_return := v_return || 'BIAN';
WHEN v_compare BETWEEN '4058' AND '40AE'
THEN
v_return := v_return || 'BIAO';
WHEN v_compare = '4060'
THEN
v_return := v_return || 'BIA';
WHEN v_compare BETWEEN '40B4' AND '40D4'
THEN
v_return := v_return || 'BIE';
WHEN v_compare BETWEEN '40D6' AND '4116'
THEN
v_return := v_return || 'BIN';
WHEN v_compare BETWEEN '4118' AND '4160'
THEN
v_return := v_return || 'BING';
WHEN v_compare BETWEEN '4161' AND '4224'
THEN
v_return := v_return || 'BO';
WHEN v_compare BETWEEN '4225' AND '427C'
THEN
v_return := v_return || 'BU';
WHEN v_compare BETWEEN '427D' AND '4289'
THEN
v_return := v_return || 'CA';
WHEN v_compare BETWEEN '428C' AND '42B5'
THEN
v_return := v_return || 'CAI';
WHEN v_compare BETWEEN '42B9' AND '430C'
THEN
v_return := v_return || 'CAN';
WHEN v_compare BETWEEN '430D' AND '4334'
THEN
v_return := v_return || 'CANG';
WHEN v_compare BETWEEN '4335' AND '435C'
THEN
v_return := v_return || 'CAO';
WHEN v_compare BETWEEN '435D' AND '438C'
THEN
v_return := v_return || 'CE';
WHEN v_compare BETWEEN '4390' AND '4398'
THEN
v_return := v_return || 'CEN';
WHEN v_compare BETWEEN '439D' AND '43AA'
THEN
v_return := v_return || 'CENG';
WHEN v_compare = '43AC'
THEN
v_return := v_return || 'CEOK';
WHEN v_compare = '43AE'
THEN
v_return := v_return || 'CEOM';
WHEN v_compare = '43B0'
THEN
v_return := v_return || 'CEON';
WHEN v_compare = '43B1'
THEN
v_return := v_return || 'CEOR';
WHEN v_compare BETWEEN '43B2' AND '440A'
THEN
v_return := v_return || 'CHA';
WHEN v_compare BETWEEN '440E' AND '442D'
THEN
v_return := v_return || 'CHAI';
WHEN v_compare BETWEEN '4431' AND '44E1'
THEN
v_return := v_return || 'CHAN';
WHEN v_compare BETWEEN '44E4' AND '4552'
THEN
v_return := v_return || 'CHANG';
WHEN v_compare BETWEEN '4554' AND '458E'
THEN
v_return := v_return || 'CHAO';
WHEN v_compare BETWEEN '4590' AND '45C8'
THEN
v_return := v_return || 'CHE';
WHEN v_compare BETWEEN '45C9' AND '463D'
THEN
v_return := v_return || 'CHEN';
WHEN v_compare BETWEEN '463E' AND '46CD'
THEN
v_return := v_return || 'CHENG';
WHEN v_compare BETWEEN '46CE' AND '47A6'
THEN
v_return := v_return || 'CHI';
WHEN v_compare BETWEEN '47A8' AND '47EC'
THEN
v_return := v_return || 'CHONG';
WHEN v_compare BETWEEN '47ED' AND '484C'
THEN
v_return := v_return || 'CHOU';
WHEN v_compare BETWEEN '484D' AND '48E2'
THEN
v_return := v_return || 'CHU';
WHEN v_compare BETWEEN '48E9' AND '48F4'
THEN
v_return := v_return || 'CHUAI';
WHEN v_compare BETWEEN '48F6' AND '4924'
THEN
v_return := v_return || 'CHUAN';
WHEN v_compare BETWEEN '4925' AND '4951'
THEN
v_return := v_return || 'CHUANG';
WHEN v_compare BETWEEN '4954' AND '496E'
THEN
v_return := v_return || 'CHUI';
WHEN v_compare BETWEEN '4971' AND '49C6'
THEN
v_return := v_return || 'CHUN';
WHEN v_compare BETWEEN '49C8' AND '49EA'
THEN
v_return := v_return || 'CHUO';
WHEN v_compare BETWEEN '49EC' AND '4A4A'
THEN
v_return := v_return || 'CI';
WHEN v_compare = '4A50'
THEN
v_return := v_return || 'CIS';
WHEN v_compare BETWEEN '4A51' AND '4AB2'
THEN
v_return := v_return || 'CONG';
WHEN v_compare BETWEEN '4AB4' AND '4ABA'
THEN
v_return := v_return || 'COU';
WHEN v_compare BETWEEN '4ABC' AND '4AEA'
THEN
v_return := v_return || 'CU';
WHEN v_compare BETWEEN '4AEE' AND '4B0C'
THEN
v_return := v_return || 'CUAN';
WHEN v_compare BETWEEN '4B0D' AND '4B56'
THEN
v_return := v_return || 'CUI';
WHEN v_compare BETWEEN '4B59' AND '4B6C'
THEN
v_return := v_return || 'CUN';
WHEN v_compare BETWEEN '4B70' AND '4BA9'
THEN
v_return := v_return || 'CUO';
WHEN v_compare BETWEEN '4BAD' AND '4BFE'
THEN
v_return := v_return || 'DA';
WHEN v_compare BETWEEN '4C00' AND '4C4E'
THEN
v_return := v_return || 'DAI';
WHEN v_compare BETWEEN '4C50' AND '4CDC'
THEN
v_return := v_return || 'DAN';
WHEN v_compare BETWEEN '4CDE' AND '4D26'
THEN
v_return := v_return || 'DANG';
WHEN v_compare BETWEEN '4D28' AND '4D76'
THEN
v_return := v_return || 'DAO';
WHEN v_compare BETWEEN '4D7E' AND '4D8D'
THEN
v_return := v_return || 'DE';
WHEN v_compare = '4D8E'
THEN
v_return := v_return || 'DEM';
WHEN v_compare BETWEEN '4D90' AND '4D91'
THEN
v_return := v_return || 'DEN';
WHEN v_compare BETWEEN '4D94' AND '4DC0'
THEN
v_return := v_return || 'DENG';
WHEN v_compare BETWEEN '4DC4' AND '4E8A'
THEN
v_return := v_return || 'DI';
WHEN v_compare = '4E8C'
THEN
v_return := v_return || 'DIA';
WHEN v_compare BETWEEN '4E8D' AND '4EE8'
THEN
v_return := v_return || 'DIAN';
WHEN v_compare BETWEEN '4EE9' AND '4F38'
THEN
v_return := v_return || 'DIAO';
WHEN v_compare BETWEEN '4F39' AND '4F90'
THEN
v_return := v_return || 'DIE';
WHEN v_compare = '4F8D'
THEN
v_return := v_return || 'DEI';
WHEN v_compare = '4F91'
THEN
v_return := v_return || 'DIM';
WHEN v_compare BETWEEN '4F92' AND '4FCD'
THEN
v_return := v_return || 'DING';
WHEN v_compare BETWEEN '4FCD' AND '4FD4'
THEN
v_return := v_return || 'DIU';
WHEN v_compare BETWEEN '4FD5' AND '5032'
THEN
v_return := v_return || 'DONG';
WHEN v_compare BETWEEN '5034' AND '507C'
THEN
v_return := v_return || 'DOU';
WHEN v_compare = '5044'
THEN
v_return := v_return || 'DUL';
WHEN v_compare BETWEEN '507E' AND '50E9'
THEN
v_return := v_return || 'DU';
WHEN v_compare BETWEEN '50EA' AND '5110'
THEN
v_return := v_return || 'DUAN';
WHEN v_compare BETWEEN '5114' AND '514E'
THEN
v_return := v_return || 'DUI';
WHEN v_compare BETWEEN '5152' AND '518D'
THEN
v_return := v_return || 'DUN';
WHEN v_compare = '5160'
THEN
v_return := v_return || 'TON';
WHEN v_compare BETWEEN '518E' AND '5200'
THEN
v_return := v_return || 'DUO';
WHEN v_compare BETWEEN '5205' AND '52C2'
THEN
v_return := v_return || 'E';
WHEN v_compare BETWEEN '52C4' AND '52CD'
THEN
v_return := v_return || 'EN';
WHEN v_compare = '52D4'
THEN
v_return := v_return || 'ENG';
WHEN v_compare = '52D5'
THEN
v_return := v_return || 'EO';
WHEN v_compare = '52D6'
THEN
v_return := v_return || 'EOL';
WHEN v_compare = '52D8'
THEN
v_return := v_return || 'EOS';
WHEN v_compare BETWEEN '52D9' AND '5332'
THEN
v_return := v_return || 'ER';
WHEN v_compare BETWEEN '5334' AND '5366'
THEN
v_return := v_return || 'FA';
WHEN v_compare BETWEEN '536A' AND '53FA'
THEN
v_return := v_return || 'FAN';
WHEN v_compare BETWEEN '53FD' AND '5438'
THEN
v_return := v_return || 'FANG';
WHEN v_compare BETWEEN '5439' AND '54B2'
THEN
v_return := v_return || 'FEI';
WHEN v_compare BETWEEN '54B4' AND '5528'
THEN
v_return := v_return || 'FEN';
WHEN v_compare BETWEEN '5529' AND '55A9'
THEN
v_return := v_return || 'FENG';
WHEN v_compare BETWEEN '55AA' AND '55AE'
THEN
v_return := v_return || 'FO';
WHEN v_compare BETWEEN '55B1' AND '55BC'
THEN
v_return := v_return || 'FOU';
WHEN v_compare BETWEEN '55BD' AND '5739'
THEN
v_return := v_return || 'FU';
WHEN v_compare = '569D'
THEN
v_return := v_return || 'M';
WHEN v_compare BETWEEN '573C' AND '574C'
THEN
v_return := v_return || 'GA';
WHEN v_compare BETWEEN '574D' AND '578C'
THEN
v_return := v_return || 'GAI';
WHEN v_compare BETWEEN '578D' AND '57F0'
THEN
v_return := v_return || 'GAN';
WHEN v_compare BETWEEN '57F1' AND '582C'
THEN
v_return := v_return || 'GANG';
WHEN v_compare BETWEEN '582E' AND '5884'
THEN
v_return := v_return || 'GAO';
WHEN v_compare BETWEEN '5885' AND '5905'
THEN
v_return := v_return || 'GE';
WHEN v_compare = '5906'
THEN
v_return := v_return || 'GEI';
WHEN v_compare BETWEEN '5909' AND '5915'
THEN
v_return := v_return || 'GEN';
WHEN v_compare BETWEEN '5918' AND '594E'
THEN
v_return := v_return || 'GENG';
WHEN v_compare = '5956'
THEN
v_return := v_return || 'GIB';
WHEN v_compare = '5958'
THEN
v_return := v_return || 'Go';
WHEN v_compare BETWEEN '5959' AND '59BA'
THEN
v_return := v_return || 'GONG';
WHEN v_compare BETWEEN '59BD' AND '5A0E'
THEN
v_return := v_return || 'GOU';
WHEN v_compare BETWEEN '5A10' AND '5AB2'
THEN
v_return := v_return || 'GU';
WHEN v_compare BETWEEN '5AB4' AND '5AE8'
THEN
v_return := v_return || 'GUA';
WHEN v_compare BETWEEN '5AE9' AND '5AF8'
THEN
v_return := v_return || 'GUAI';
WHEN v_compare BETWEEN '5AFD' AND '5B5E'
THEN
v_return := v_return || 'GUAN';
WHEN v_compare BETWEEN '5B60' AND '5B8C'
THEN
v_return := v_return || 'GUANG';
WHEN v_compare BETWEEN '5B8D' AND '5C2E'
THEN
v_return := v_return || 'GUI';
WHEN v_compare = '5BC8'
THEN
v_return := v_return || 'KWI';
WHEN v_compare BETWEEN '5C30' AND '5C58'
THEN
v_return := v_return || 'GUN';
WHEN v_compare BETWEEN '5C51' AND '5CB6'
THEN
v_return := v_return || 'GUO';
WHEN v_compare BETWEEN '5CB8' AND '5CBD'
THEN
v_return := v_return || 'HA';
WHEN v_compare BETWEEN '5CC6' AND '5CEC'
THEN
v_return := v_return || 'HAI';
WHEN v_compare = '5CED'
THEN
v_return := v_return || 'HAL';
WHEN v_compare BETWEEN '5CEE' AND '5D99'
THEN
v_return := v_return || 'HAN';
WHEN v_compare BETWEEN '5D9D' AND '5DBC'
THEN
v_return := v_return || 'HANG';
WHEN v_compare BETWEEN '5DBE' AND '5E20'
THEN
v_return := v_return || 'HAO';
WHEN v_compare = '5E02'
THEN
v_return := v_return || 'HO';
WHEN v_compare BETWEEN '5E22' AND '5EC5'
THEN
v_return := v_return || 'HE';
WHEN v_compare BETWEEN '5EC6' AND '5ECE'
THEN
v_return := v_return || 'HEI';
WHEN v_compare BETWEEN '5ED0' AND '5EDC'
THEN
v_return := v_return || 'HEN';
WHEN v_compare BETWEEN '5EDD' AND '5EDC'
THEN
v_return := v_return || 'HENG';
WHEN v_compare = '5F04'
THEN
v_return := v_return || 'HOL';
WHEN v_compare BETWEEN '5F05' AND '5F8D'
THEN
v_return := v_return || 'HONG';
WHEN v_compare BETWEEN '5F8E' AND '5FD2'
THEN
v_return := v_return || 'HOU';
WHEN v_compare BETWEEN '5FD4' AND '60B1'
THEN
v_return := v_return || 'HU';
WHEN v_compare BETWEEN '60B2' AND '6111'
THEN
v_return := v_return || 'HUA';
WHEN v_compare BETWEEN '6112' AND '612D'
THEN
v_return := v_return || 'HUAI';
WHEN v_compare BETWEEN '612E' AND '61C6'
THEN
v_return := v_return || 'HUAN';
WHEN v_compare BETWEEN '61CA' AND '624A'
THEN
v_return := v_return || 'HUANG';
WHEN v_compare BETWEEN '624C' AND '6344'
THEN
v_return := v_return || 'HUI';
WHEN v_compare BETWEEN '6346' AND '6388'
THEN
v_return := v_return || 'HUN';
WHEN v_compare BETWEEN '638C' AND '63FA'
THEN
v_return := v_return || 'HUO';
WHEN v_compare = '63FD'
THEN
v_return := v_return || 'HWA';
WHEN v_compare BETWEEN '63FE' AND '6601'
THEN
v_return := v_return || 'JI';
WHEN v_compare BETWEEN '6604' AND '6691'
THEN
v_return := v_return || 'JIA';
WHEN v_compare BETWEEN '6692' AND '67F8'
THEN
v_return := v_return || 'JIAN';
WHEN v_compare BETWEEN '67F9' AND '6860'
THEN
v_return := v_return || 'JIANG';
WHEN v_compare BETWEEN '6862' AND '6930'
THEN
v_return := v_return || 'JIAO';
WHEN v_compare BETWEEN '6931' AND '6A18'
THEN
v_return := v_return || 'JIE';
WHEN v_compare BETWEEN '6A1A' AND '6AC9'
THEN
v_return := v_return || 'JIN';
WHEN v_compare BETWEEN '6ACA' AND '6B65'
THEN
v_return := v_return || 'JING';
WHEN v_compare BETWEEN '6B66' AND '6B9A'
THEN
v_return := v_return || 'JIONG';
WHEN v_compare BETWEEN '6B9C' AND '6C0C'
THEN
v_return := v_return || 'JIU';
WHEN v_compare = '6C0D'
THEN
v_return := v_return || 'JOU';
WHEN v_compare BETWEEN '6C0E' AND '6D2A'
THEN
v_return := v_return || 'JU';
WHEN v_compare BETWEEN '6D2D' AND '6D80'
THEN
v_return := v_return || 'JUAN';
WHEN v_compare BETWEEN '6D82' AND '6E28'
THEN
v_return := v_return || 'JUE';
WHEN v_compare BETWEEN '6E2A' AND '6E85'
THEN
v_return := v_return || 'JUN';
WHEN v_compare BETWEEN '6E86' AND '6E92'
THEN
v_return := v_return || 'KA';
WHEN v_compare BETWEEN '6E94' AND '6EC9'
THEN
v_return := v_return || 'KAI';
WHEN v_compare = '6ECC'
THEN
v_return := v_return || 'KAL';
WHEN v_compare BETWEEN '6ECD' AND '6F00'
THEN
v_return := v_return || 'KAN';
WHEN v_compare BETWEEN '6F02' AND '6F30'
THEN
v_return := v_return || 'KANG';
WHEN v_compare BETWEEN '6F31' AND '6F4D'
THEN
v_return := v_return || 'KAO';
WHEN v_compare BETWEEN '6F50' AND '6FC8'
THEN
v_return := v_return || 'KE';
WHEN v_compare BETWEEN '6FC9' AND '6FDA'
THEN
v_return := v_return || 'KEN';
WHEN v_compare BETWEEN '6FDC' AND '6FF5'
THEN
v_return := v_return || 'KENG';
WHEN v_compare = '6FFC'
THEN
v_return := v_return || 'KI';
WHEN v_compare BETWEEN '6FFD' AND '7016'
THEN
v_return := v_return || 'KONG';
WHEN v_compare = '7018'
THEN
v_return := v_return || 'KOS';
WHEN v_compare BETWEEN '7019' AND '703E'
THEN
v_return := v_return || 'KOU';
WHEN v_compare BETWEEN '7041' AND '707A'
THEN
v_return := v_return || 'KU';
WHEN v_compare BETWEEN '707C' AND '7095'
THEN
v_return := v_return || 'KUA';
WHEN v_compare BETWEEN '709A' AND '70C1'
THEN
v_return := v_return || 'KUAI';
WHEN v_compare BETWEEN '70C2' AND '70D4'
THEN
v_return := v_return || 'KUAN';
WHEN v_compare BETWEEN '70D8' AND '7128'
THEN
v_return := v_return || 'KUANG';
WHEN v_compare BETWEEN '7129' AND '71B1'
THEN
v_return := v_return || 'KUI';
WHEN v_compare BETWEEN '71B2' AND '71FE'
THEN
v_return := v_return || 'KUN';
WHEN v_compare BETWEEN '7200' AND '7226'
THEN
v_return := v_return || 'KUO';
WHEN v_compare = '7228'
THEN
v_return := v_return || 'KWEOK';
WHEN v_compare BETWEEN '722C' AND '726A'
THEN
v_return := v_return || 'LA';
WHEN v_compare BETWEEN '726C' AND '72B5'
THEN
v_return := v_return || 'LAI';
WHEN v_compare BETWEEN '72B9' AND '733C'
THEN
v_return := v_return || 'LAN';
WHEN v_compare BETWEEN '733D' AND '7388'
THEN
v_return := v_return || 'LANG';
WHEN v_compare BETWEEN '7389' AND '73E5'
THEN
v_return := v_return || 'LAO';
WHEN v_compare BETWEEN '73E8' AND '7402'
THEN
v_return := v_return || 'LE';
WHEN v_compare BETWEEN '7404' AND '7485'
THEN
v_return := v_return || 'LEI';
WHEN v_compare BETWEEN '7488' AND '7499'
THEN
v_return := v_return || 'LENG';
WHEN v_compare BETWEEN '749C' AND '7642'
THEN
v_return := v_return || 'LI';
WHEN v_compare BETWEEN '7644' AND '7645'
THEN
v_return := v_return || 'LIA';
WHEN v_compare BETWEEN '7646' AND '76EC'
THEN
v_return := v_return || 'LIAN';
WHEN v_compare BETWEEN '76ED' AND '7731'
THEN
v_return := v_return || 'LIANG';
WHEN v_compare BETWEEN '7732' AND '7794'
THEN
v_return := v_return || 'LIAO';
WHEN v_compare BETWEEN '7795' AND '77E2'
THEN
v_return := v_return || 'LIE';
WHEN v_compare BETWEEN '77E4' AND '785D'
THEN
v_return := v_return || 'LIN';
WHEN v_compare = '77EA'
THEN
v_return := v_return || 'LEN';
WHEN v_compare BETWEEN '7860' AND '7904'
THEN
v_return := v_return || 'LING';
WHEN v_compare BETWEEN '7905' AND '7986'
THEN
v_return := v_return || 'LIU';
WHEN v_compare BETWEEN '7988' AND '7989'
THEN
v_return := v_return || 'LO';
WHEN v_compare BETWEEN '798A' AND '79FD'
THEN
v_return := v_return || 'LONG';
WHEN v_compare BETWEEN '79FE' AND '7A49'
THEN
v_return := v_return || 'LOU';
WHEN v_compare BETWEEN '7A4C' AND '7B4D'
THEN
v_return := v_return || 'LU';
WHEN v_compare BETWEEN '7B4E' AND '7B80'
THEN
v_return := v_return || 'LUAN';
WHEN v_compare BETWEEN '7B81' AND '7BB2'
THEN
v_return := v_return || 'LUN';
WHEN v_compare BETWEEN '7BB5' AND '7C25'
THEN
v_return := v_return || 'LUO';
WHEN v_compare BETWEEN '7C26' AND '7C82'
THEN
v_return := v_return || 'LV';
WHEN v_compare BETWEEN '7C84' AND '7C98'
THEN
v_return := v_return || 'LUE';
WHEN v_compare BETWEEN '7C9C' AND '7CE4'
THEN
v_return := v_return || 'MA';
WHEN v_compare BETWEEN '7CE5' AND '7DOC'
THEN
v_return := v_return || 'MAI';
WHEN v_compare BETWEEN '7D11' AND '7D6E'
THEN
v_return := v_return || 'MAN';
WHEN v_compare BETWEEN '7D70' AND '7DA9'
THEN
v_return := v_return || 'MANG';
WHEN v_compare BETWEEN '7DAC' AND '7E15'
THEN
v_return := v_return || 'MAO';
WHEN v_compare = '7E0C'
THEN
v_return := v_return || 'Q';
WHEN v_compare BETWEEN '7E18' AND '7E1E'
THEN
v_return := v_return || 'ME';
WHEN v_compare BETWEEN '7E20' AND '7E9A'
THEN
v_return := v_return || 'MEI';
WHEN v_compare BETWEEN '7E9D' AND '7EC1'
THEN
v_return := v_return || 'MEN';
WHEN v_compare BETWEEN '7EC2' AND '7F36'
THEN
v_return := v_return || 'MENG';
WHEN v_compare = '7F38'
THEN
v_return := v_return || 'MEO';
WHEN v_compare BETWEEN '7F39' AND '7FE4'
THEN
v_return := v_return || 'MI';
WHEN v_compare BETWEEN '7FE6' AND '8034'
THEN
v_return := v_return || 'MIAN';
WHEN v_compare BETWEEN '8035' AND '805A'
THEN
v_return := v_return || 'MIAO';
WHEN v_compare BETWEEN '805C' AND '8081'
THEN
v_return := v_return || 'MIE';
WHEN v_compare BETWEEN '8084' AND '80E4'
THEN
v_return := v_return || 'MIN';
WHEN v_compare = '8096'
THEN
v_return := v_return || 'LEM';
WHEN v_compare BETWEEN '80E5' AND '8116'
THEN
v_return := v_return || 'MING';
WHEN v_compare BETWEEN '8119' AND '811D'
THEN
v_return := v_return || 'MIU';
WHEN v_compare BETWEEN '811E' AND '81A9'
THEN
v_return := v_return || 'MO';
WHEN v_compare BETWEEN '81AC' AND '81CC'
THEN
v_return := v_return || 'MOU';
WHEN v_compare BETWEEN '81CD' AND '821E'
THEN
v_return := v_return || 'MU';
WHEN v_compare = '8220'
THEN
v_return := v_return || 'MYEO';
WHEN v_compare = '8221'
THEN
v_return := v_return || 'MYEON';
WHEN v_compare = '8222'
THEN
v_return := v_return || 'MYEONG';
WHEN v_compare BETWEEN '8224' AND '8258'
THEN
v_return := v_return || 'NA';
WHEN v_compare BETWEEN '825D' AND '8285'
THEN
v_return := v_return || 'NAI';
WHEN v_compare BETWEEN '8289' AND '82B5'
THEN
v_return := v_return || 'NAN';
WHEN v_compare BETWEEN '82B9' AND '82D0'
THEN
v_return := v_return || 'NANG';
WHEN v_compare BETWEEN '82D1' AND '8311'
THEN
v_return := v_return || 'NAO';
WHEN v_compare BETWEEN '8312' AND '8320'
THEN
v_return := v_return || 'NE';
WHEN v_compare BETWEEN '8322' AND '8331'
THEN
v_return := v_return || 'NEI';
WHEN v_compare = '8334'
THEN
v_return := v_return || 'NEM';
WHEN v_compare = '8336'
THEN
v_return := v_return || 'NEN';
WHEN v_compare = '8339'
THEN
v_return := v_return || 'NENG';
WHEN v_compare = '833E'
THEN
v_return := v_return || 'NEUS';
WHEN v_compare = '8342'
THEN
v_return := v_return || 'NGAG';
WHEN v_compare = '8344'
THEN
v_return := v_return || 'NGAI';
WHEN v_compare = '8345'
THEN
v_return := v_return || 'NGAM';
WHEN v_compare BETWEEN '8346' AND '83B9'
THEN
v_return := v_return || 'NI';
WHEN v_compare BETWEEN '83BC' AND '83ED'
THEN
v_return := v_return || 'NIAN';
WHEN v_compare BETWEEN '83EE' AND '83F5'
THEN
v_return := v_return || 'NIANG';
WHEN v_compare BETWEEN '83F8' AND '8414'
THEN
v_return := v_return || 'NIAO';
WHEN v_compare BETWEEN '8415' AND '8478'
THEN
v_return := v_return || 'NIE';
WHEN v_compare BETWEEN '8479' AND '8480'
THEN
v_return := v_return || 'NIN';
WHEN v_compare BETWEEN '8481' AND '84B4'
THEN
v_return := v_return || 'NING';
WHEN v_compare BETWEEN '84B5' AND '84D1'
THEN
v_return := v_return || 'NIU';
WHEN v_compare BETWEEN '84D4' AND '84FA'
THEN
v_return := v_return || 'NONG';
WHEN v_compare = '84E8'
THEN
v_return := v_return || 'NUNG';
WHEN v_compare BETWEEN '84FD' AND '850E'
THEN
v_return := v_return || 'NOU';
WHEN v_compare BETWEEN '8511' AND '8522'
THEN
v_return := v_return || 'NU';
WHEN v_compare BETWEEN '8524' AND '852C'
THEN
v_return := v_return || 'NUAN';
WHEN v_compare = '852D'
THEN
v_return := v_return || 'NUN';
WHEN v_compare BETWEEN '8530' AND '8559'
THEN
v_return := v_return || 'NUO';
WHEN v_compare BETWEEN '855A' AND '8566'
THEN
v_return := v_return || 'NV';
WHEN v_compare BETWEEN '856D' AND '8574'
THEN
v_return := v_return || 'NUE';
WHEN v_compare = '8575'
THEN
v_return := v_return || 'O';
WHEN v_compare = '8579'
THEN
v_return := v_return || 'OES';
WHEN v_compare = '857A'
THEN
v_return := v_return || 'OL';
WHEN v_compare = '857C'
THEN
v_return := v_return || 'ON';
WHEN v_compare BETWEEN '857D' AND '85AE'
THEN
v_return := v_return || 'OU';
WHEN v_compare BETWEEN '85B1' AND '85C9'
THEN
v_return := v_return || 'PA';
WHEN v_compare BETWEEN '85CA' AND '85E4'
THEN
v_return := v_return || 'PAI';
WHEN v_compare = '85E5'
THEN
v_return := v_return || 'PAK';
WHEN v_compare BETWEEN '85E8' AND '8625'
THEN
v_return := v_return || 'PAN';
WHEN v_compare BETWEEN '8626' AND '8658'
THEN
v_return := v_return || 'PANG';
WHEN v_compare BETWEEN '8659' AND '8688'
THEN
v_return := v_return || 'PAO';
WHEN v_compare BETWEEN '868A' AND '86C5'
THEN
v_return := v_return || 'PEI';
WHEN v_compare BETWEEN '86C8' AND '86D6'
THEN
v_return := v_return || 'PEN';
WHEN v_compare BETWEEN '86D8' AND '8740'
THEN
v_return := v_return || 'PENG';
WHEN v_compare = '8741'
THEN
v_return := v_return || 'PEOL';
WHEN v_compare = '8742'
THEN
v_return := v_return || 'PHAS';
WHEN v_compare = '8744'
THEN
v_return := v_return || 'PHDENG';
WHEN v_compare = '8745'
THEN
v_return := v_return || 'PHOI';
WHEN v_compare = '8746'
THEN
v_return := v_return || 'PHOS';
WHEN v_compare BETWEEN '8748' AND '880D'
THEN
v_return := v_return || 'PI';
WHEN v_compare BETWEEN '880E' AND '883A'
THEN
v_return := v_return || 'PIAN';
WHEN v_compare BETWEEN '883C' AND '8869'
THEN
v_return := v_return || 'PIAO';
WHEN v_compare BETWEEN '886D' AND '8879'
THEN
v_return := v_return || 'PIE';
WHEN v_compare BETWEEN '887A' AND '88A0'
THEN
v_return := v_return || 'PIN';
WHEN v_compare BETWEEN '88A1' AND '88EC'
THEN
v_return := v_return || 'PING';
WHEN v_compare BETWEEN '88F0' AND '8938'
THEN
v_return := v_return || 'PO';
WHEN v_compare BETWEEN '893E' AND '8958'
THEN
v_return := v_return || 'POU';
WHEN v_compare BETWEEN '895A' AND '895C'
THEN
v_return := v_return || 'PPUN';
WHEN v_compare BETWEEN '895D' AND '89C4'
THEN
v_return := v_return || 'PU';
WHEN v_compare BETWEEN '89C5' AND '8B3E'
THEN
v_return := v_return || 'QI';
WHEN v_compare BETWEEN '8B41' AND '8B61'
THEN
v_return := v_return || 'QIA';
WHEN v_compare BETWEEN '8B62' AND '8C54'
THEN
v_return := v_return || 'QIAN';
WHEN v_compare BETWEEN '8C5A' AND '8CB4'
THEN
v_return := v_return || 'QIANG';
WHEN v_compare BETWEEN '8CB8' AND '8D3D'
THEN
v_return := v_return || 'QIAO';
WHEN v_compare BETWEEN '8D40' AND '8D7E'
THEN
v_return := v_return || 'QIE';
WHEN v_compare BETWEEN '8D81' AND '8DFA'
THEN
v_return := v_return || 'QIN';
WHEN v_compare BETWEEN '8DFC' AND '8E5D'
THEN
v_return := v_return || 'QING';
WHEN v_compare BETWEEN '8E5E' AND '8E98'
THEN
v_return := v_return || 'QIONG';
WHEN v_compare BETWEEN '8E9A' AND '8F2A'
THEN
v_return := v_return || 'QIU';
WHEN v_compare BETWEEN '8F2E' AND '8FE9'
THEN
v_return := v_return || 'QU';
WHEN v_compare BETWEEN '8FEA' AND '905D'
THEN
v_return := v_return || 'QUAN';
WHEN v_compare BETWEEN '905E' AND '9099'
THEN
v_return := v_return || 'QUE';
WHEN v_compare BETWEEN '909A' AND '90AA'
THEN
v_return := v_return || 'QUN';
WHEN v_compare BETWEEN '90B0' AND '90B1'
THEN
v_return := v_return || 'RA';
WHEN v_compare = '90B2'
THEN
v_return := v_return || 'RAM';
WHEN v_compare BETWEEN '90B4' AND '90E5'
THEN
v_return := v_return || 'RAN';
WHEN v_compare BETWEEN '90E6' AND '9104'
THEN
v_return := v_return || 'RANG';
WHEN v_compare BETWEEN '9105' AND '911C'
THEN
v_return := v_return || 'RAO';
WHEN v_compare BETWEEN '911D' AND '9120'
THEN
v_return := v_return || 'RE';
WHEN v_compare BETWEEN '9121' AND '9180'
THEN
v_return := v_return || 'REN';
WHEN v_compare BETWEEN '9181' AND '918D'
THEN
v_return := v_return || 'RENG';
WHEN v_compare BETWEEN '918E' AND '9196'
THEN
v_return := v_return || 'RI';
WHEN v_compare BETWEEN '9189' AND '91F1'
THEN
v_return := v_return || 'RONG';
WHEN v_compare BETWEEN '91F2' AND '9218'
THEN
v_return := v_return || 'ROU';
WHEN v_compare BETWEEN '9219' AND '9269'
THEN
v_return := v_return || 'RU';
WHEN v_compare BETWEEN '926C' AND '9292'
THEN
v_return := v_return || 'RUAN';
WHEN v_compare BETWEEN '9294' AND '92BD'
THEN
v_return := v_return || 'RUI';
WHEN v_compare BETWEEN '92BE' AND '92C9'
THEN
v_return := v_return || 'RUN';
WHEN v_compare = '92CA'
THEN
v_return := v_return || 'RUA';
WHEN v_compare BETWEEN '92CA' AND '92E4'
THEN
v_return := v_return || 'RUO';
WHEN v_compare BETWEEN '92E5' AND '9309'
THEN
v_return := v_return || 'SA';
WHEN v_compare = '930A'
THEN
v_return := v_return || 'SAENG';
WHEN v_compare BETWEEN '930C' AND '9325'
THEN
v_return := v_return || 'SAI';
WHEN v_compare = '9328'
THEN
v_return := v_return || 'SAL';
WHEN v_compare BETWEEN '9329' AND '9355'
THEN
v_return := v_return || 'SAN';
WHEN v_compare BETWEEN '9358' AND '936A'
THEN
v_return := v_return || 'SANG';
WHEN v_compare BETWEEN '936C' AND '9391'
THEN
v_return := v_return || 'SAO';
WHEN v_compare BETWEEN '9392' AND '93C5'
THEN
v_return := v_return || 'SE';
WHEN v_compare = '93C6'
THEN
v_return := v_return || 'SED';
WHEN v_compare BETWEEN '93C8' AND '93CC'
THEN
v_return := v_return || 'SEN';
WHEN v_compare BETWEEN '93CD' AND '93D0'
THEN
v_return := v_return || 'SENG';
WHEN v_compare = '93D1'
THEN
v_return := v_return || 'SEO';
WHEN v_compare = '93D2'
THEN
v_return := v_return || 'SEON';
WHEN v_compare BETWEEN '93D4' AND '941A'
THEN
v_return := v_return || 'SHA';
WHEN v_compare BETWEEN '941D' AND '9428'
THEN
v_return := v_return || 'SHAI';
WHEN v_compare BETWEEN '9429' AND '94C1'
THEN
v_return := v_return || 'SHAN';
WHEN v_compare BETWEEN '94C2' AND '94EE'
THEN
v_return := v_return || 'SHANG';
WHEN v_compare BETWEEN '94F1' AND '952D'
THEN
v_return := v_return || 'SHAO';
WHEN v_compare BETWEEN '952E' AND '9571'
THEN
v_return := v_return || 'SHE';
WHEN v_compare BETWEEN '9574' AND '9602'
THEN
v_return := v_return || 'SHEN';
WHEN v_compare BETWEEN '9604' AND '965C'
THEN
v_return := v_return || 'SHENG';
WHEN v_compare BETWEEN '965E' AND '9786'
THEN
v_return := v_return || 'SHI';
WHEN v_compare BETWEEN '9788' AND '97AE'
THEN
v_return := v_return || 'SHOU';
WHEN v_compare BETWEEN '97B0' AND '9878'
THEN
v_return := v_return || 'SHU';
WHEN v_compare BETWEEN '987A' AND '987E'
THEN
v_return := v_return || 'SHUA';
WHEN v_compare BETWEEN '9880' AND '988A'
THEN
v_return := v_return || 'SHUAI';
WHEN v_compare BETWEEN '988C' AND '9894'
THEN
v_return := v_return || 'SHUAN';
WHEN v_compare BETWEEN '9895' AND '98BE'
THEN
v_return := v_return || 'SHUANG';
WHEN v_compare BETWEEN '98C0' AND '98D6'
THEN
v_return := v_return || 'SHUI';
WHEN v_compare BETWEEN '98DC' AND '98EE'
THEN
v_return := v_return || 'SHUN';
WHEN v_compare BETWEEN '98F1' AND '9911'
THEN
v_return := v_return || 'SHUO';
WHEN v_compare BETWEEN '9912' AND '99AD'
THEN
v_return := v_return || 'SI';
WHEN v_compare = '99AE'
THEN
v_return := v_return || 'SO';
WHEN v_compare = '99B0'
THEN
v_return := v_return || 'SOL';
WHEN v_compare BETWEEN '99B1' AND '99F6'
THEN
v_return := v_return || 'SONG';
WHEN v_compare BETWEEN '99F8' AND '9A36'
THEN
v_return := v_return || 'SOU';
WHEN v_compare BETWEEN '9A38' AND '9AB6'
THEN
v_return := v_return || 'SU';
WHEN v_compare BETWEEN '9AB8' AND '9AC4'
THEN
v_return := v_return || 'SUAN';
WHEN v_compare BETWEEN '9AC5' AND '9B3A'
THEN
v_return := v_return || 'SUI';
WHEN v_compare = '9AF0'
THEN
v_return := v_return || 'WIE';
WHEN v_compare BETWEEN '9B3C' AND '9B62'
THEN
v_return := v_return || 'SUN';
WHEN v_compare BETWEEN '9B65' AND '9BA9'
THEN