Copy Code code as follows:
/* -------------------------------------------------------------
Function: Fn_getpinyin
Description: Chinese pinyin (no data table version)
Use: Dbo.fn_getpinyin (' People's Republic of China ') = Zhonghuarenmingongheguo
Author: Stream Fragrant Feather (adapted: Tony)
------------------------------------------------------------- */
IF object_id (' [Fn_getpinyin] ') is not NULL
DROP FUNCTION [Fn_getpinyin]
Go
Create function [dbo]. [Fn_getpinyin] (@words nvarchar (2000))
Returns varchar (8000)
As
Begin
DECLARE @word nchar (1)
DECLARE @pinyin varchar (8000)
DECLARE @i int
DECLARE @words_len int
DECLARE @unicode int
Set @i = 1
Set @words = LTrim (RTrim (@words))
Set @words_len = Len (@words)
while (@i <= @words_len)--Looping characters
Begin
Set @word = substring (@words, @i, 1)
Set @unicode = Unicode (@word)
Set @pinyin = ISNULL (@pinyin +space (1), "") +
(Case when Unicode (@word) between 19968 and 19968+20901 then
(select top 1 py from (
Select ' A ' as Py,n ' 厑 ' as Word
UNION ALL SELECT ' AI ', N ' 靉 '
UNION ALL SELECT ' an ', N ' Dim '
UNION ALL select ' Ang ', N ' 醠 '
UNION ALL SELECT ' AO ', N ' 驁 '
UNION ALL select ' Ba ', N ' 欛 '
UNION ALL select ' Bai ', N ' 瓸 '--韛 兡 瓸
UNION ALL select ' ban ', N ' flap '
UNION ALL select ' Bang ', N ' pound '
UNION ALL select ' Bao ', N ' 鑤 '
UNION ALL select ' bei ', N ' 鐾 '
UNION ALL select ' Ben ', N ' 輽 '
UNION ALL SELECT ' Beng ', N ' 鏰 '
UNION ALL SELECT ' Bi ', N ' 鼊 '
UNION ALL SELECT ' Bian ', N ' change '
UNION ALL SELECT ' Biao ', N ' 鰾 '
UNION ALL SELECT ' Bie ', N ' awkward '
UNION ALL select ' Bin ', N ' grey '
UNION ALL select ' Bing ', N ' 靐 '
UNION ALL select ' Bo ', N ' carrot '
UNION ALL select ' Bu ', N ' book '
UNION ALL SELECT ' Ca ', N ' fire in '
UNION ALL select ' Cai ', N ' 乲 '--縩 乲
UNION ALL SELECT ' Can ', N ' 爘 '
UNION ALL SELECT ' Cang ', N ' 賶 '
UNION ALL select ' Cao ', N ' 鼜 '
UNION ALL select ' CE ', N ' 簎 '
UNION ALL SELECT ' cen ', N ' 笒 '
UNION ALL SELECT ' CEng ', N ' 乽 '--硛 硳 岾 猠
UNION ALL select ' Cha ', N ' 詫 '
UNION ALL select ' Chai ', N ' 囆 '
UNION ALL select ' Chan ', N ' trembling '
UNION ALL select ' Chang ', N ' 韔 '
UNION ALL select ' Chao ', N ' 觘 '
UNION ALL select ' Che ', N ' 爡 '
UNION ALL select ' Chen ', N ' 讖 '
UNION ALL select ' Cheng ', N ' scale '
UNION ALL select ' Chi ', N ' 鷘 '
UNION ALL select ' Chong ', N ' 銃 '
UNION ALL select ' Chou ', N ' 殠 '
UNION ALL select ' Chu ', N ' a '
UNION ALL SELECT ' Chuai ', N ' kick '
UNION ALL select ' Chuan ', N ' 鶨 '
UNION ALL SELECT ' Chuang ', N ' 愴 '
UNION ALL select ' Chui ', N ' the '
UNION ALL SELECT ' Chun ', N ' stupid '
UNION ALL SELECT ' Chuo ', N ' 縒 '
UNION ALL select ' CI ', N ' 嗭 '--Bestow 嗭
UNION ALL select ' Cong ', N ' 謥 '
UNION ALL SELECT ' Cou ', N ' 輳 '
UNION ALL select ' Cu ', N ' 顣 '
UNION ALL SELECT ' Cuan ', N ' Cuan '
UNION ALL select ' Cui ', N ' 臎 '
UNION ALL SELECT ' Cun ', N ' 籿 '
UNION ALL SELECT ' CuO ', N ' wrong '
UNION ALL select ' da ', N ' 橽 '
UNION ALL select ' Dai ', N ' 靆 '
UNION ALL SELECT ' Dan ', N ' 饏 '
UNION ALL SELECT ' Dang ', N ' 闣 '
UNION ALL SELECT ' DAO ', N ' tents '
UNION ALL select ' de ', N ' '
UNION ALL Select ' Den ', N ' 扽 '
UNION ALL select ' Deng ', N ' 鐙 '
UNION ALL select ' di ', N ' 螮 '
UNION ALL SELECT ' Dia ', N ' whine '
UNION ALL SELECT ' Dian ', N ' 驔 '
UNION ALL SELECT ' Diao ', N ' 鑃 '
UNION ALL Select ' die ', N ' 嚸 '--眰 嚸
UNION ALL select ' Ding ', N ' 顁 '
UNION ALL SELECT ' Diu ', N ' 銩 '
UNION ALL select ' Dong ', N ' 霘 '
UNION ALL SELECT ' Dou ', N ' 鬭 '
UNION ALL select ' du ', N ' beetle '
UNION ALL select ' Duan ', N ' 叾 '--籪 叾
UNION ALL SELECT ' DUI ', N ' 譵 '
UNION ALL SELECT ' Dun ', N ' 踲 '
UNION ALL select ' Duo ', N ' 鵽 '
UNION ALL SELECT ' E ', N ' crocodile '
UNION ALL select ' en ', N ' press '
UNION ALL SELECT ' Eng ', N ' 鞥 '
UNION ALL SELECT ' er ', N ' 樲 '
UNION ALL select ' FA ', N ' hair '
UNION ALL SELECT ' Fan ', N ' 瀪 '
UNION ALL select ' Fang ', N ' put '
UNION ALL select ' Fei ', N ' 靅 '
UNION ALL SELECT ' Fen ', N ' 鱝 '
UNION ALL select ' Feng ', N ' 覅 '
UNION ALL SELECT ' fo ', N ' 梻 '
UNION ALL select ' Fou ', N ' 鴀 '
UNION ALL select ' Fu ', N ' 猤 '--鰒 猤
UNION ALL SELECT ' GA ', N ' 魀 '
UNION ALL select ' Gai ', N ' 瓂 '
UNION ALL select ' Gan ', N ' 灨 '
UNION ALL select ' Gang ', N ' 戇 '
UNION ALL select ' Gao ', N ' 鋯 '
UNION ALL SELECT ' GE ', N ' 獦 '
UNION ALL SELECT ' GEi ', N ' giving '
UNION ALL select ' Gen ', N ' 搄 '
UNION ALL SELECT ' Geng ', N ' 堩 '--Mutual benefit 堩 啹 snap
UNION ALL select ' Gong ', N ' 兣 '--熕 贑 兝 兣
UNION ALL SELECT ' Gou ', N ' shopping '
UNION ALL select ' gu ', N ' care '
UNION ALL select ' Gua ', N ' 詿 '
UNION ALL SELECT ' Guai ', N ' 恠 '
UNION ALL SELECT ' Guan ', N ' 鱹 '
UNION ALL select ' Guang ', N ' select '
UNION ALL select ' GUI ', N ' 鱥 '
UNION ALL SELECT ' Gun ', N ' 謴 '
UNION ALL select ' Guo ', N ' hiker '
UNION ALL Select ' Ha ', N ' ha '
UNION ALL select ' Hai ', N ' 饚 '
UNION ALL select ' Han ', N ' 鶾 '
UNION ALL select ' Hang ', N ' Kang '
UNION ALL select ' Hao ', N ' 兞 '
UNION ALL SELECT ' he ', N ' 靏 '
UNION ALL SELECT ' Hei ', N ' 嬒 '
UNION ALL Select ' Hen ', N ' hate '
UNION ALL select ' Heng ', N ' 堼 '--堼 double Happiness
UNION ALL SELECT ' 鬨 ', N '
UNION ALL select ' Hou ', N ' 鱟 '
UNION ALL select ' Hu ', N ' 鸌 '
UNION ALL select ' Hua ', N ' 蘳 '
UNION ALL SELECT ' Huai ', N ' 蘾 '
UNION ALL select ' Huan ', N ' 鰀 '
UNION ALL select ' Huang ', N ' 鎤 '
UNION ALL select ' hui ', N ' 顪 '
UNION ALL SELECT ' Hun ', N ' 諢 '
UNION ALL select ' Huo ', N ' 夻 '
UNION ALL select ' Ji ', N ' Tianji '
UNION ALL SELECT ' Jia ', N ' 嗧 '
UNION ALL select ' Jian ', N ' 鑳 '
UNION ALL select ' Jiang ', N ' 謽 '
UNION ALL select ' Jiao ', N ' 釂 '
UNION ALL select ' Jie ', N ' 繲 '
UNION ALL select ' Jin ', N ' 齽 '
UNION ALL select ' Jing ', N ' 竸 '
UNION ALL SELECT ' Jiong ', N ' 蘔 '
UNION ALL SELECT ' JIU ', N ' 欍 '
UNION ALL select ' Ju ', N ' 爠 '
UNION ALL SELECT ' Juan ', N ' infallible '
UNION ALL SELECT ' Jue ', N ' 钁 '
UNION ALL SELECT ' June ', N ' 攈 '
UNION ALL select ' ka ', N ' californium '
UNION ALL select ' Kai ', N ' 乫 '--鎎 乫
UNION ALL SELECT ' kan ', N ' 矙 '
UNION ALL select ' Kang ', N ' 閌 '
UNION ALL select ' Kao ', N ' 鯌 '
UNION ALL select ' Ke ', N ' 騍 '
UNION ALL SELECT ' Ken ', N ' 褃 '
UNION ALL SELECT ' Keng ', N ' 鏗 '--巪 乬 唟 厼
UNION ALL SELECT ' Kong ', N ' 廤 '
UNION ALL SELECT ' Kou ', N ' 鷇 '
UNION ALL select ' Ku ', N ' 嚳 '
UNION ALL SELECT ' Kua ', N ' hip '
UNION ALL SELECT ' Kuai ', N ' 鱠 '
UNION ALL select ' Kuan ', N ' 窾 '
UNION ALL SELECT ' Kuang ', N ' 鑛 '
UNION ALL SELECT ' Kui ', N ' 鑎 '
UNION ALL select ' Kun ', N ' 睏 '
UNION ALL select ' Kuo ', N ' 穒 '
UNION ALL select ' La ', N ' 鞡 '
UNION ALL select ' Lai ', N ' 籟 '
UNION ALL SELECT ' LAN ', N ' 糷 '
UNION ALL select ' Lang ', N ' 唥 '
UNION ALL select ' Lao ', N ' 軂 '
UNION ALL select ' Le ', N ' 餎 '
UNION ALL select ' Lei ', N ' fillet '--le fillet
UNION ALL select ' Leng ', N ' 睖 '
UNION ALL select ' Li ', N ' 瓈 '
UNION ALL SELECT ' Lia ', N ' both '
UNION ALL select ' Lian ', N ' 纞 '
UNION ALL select ' Liang ', N ' 鍄 '
UNION ALL select ' Liao ', N ' understand '
UNION ALL select ' Lie ', N ' Chek Kok '
UNION ALL select ' Lin ', N ' 轥 '--轥 carrying
UNION ALL select ' Ling ', N ' 炩 '
UNION ALL select ' Liu ', N ' slightly '--瓼 甅 囖
UNION ALL select ' Long ', N ' 贚 '
UNION ALL select ' Lou ', N ' 鏤箜 '
UNION ALL SELECT ' Lu ', N ' 氇 '
UNION ALL SELECT ' LV ', N ' 鑢 '
UNION ALL SELECT ' Luan ', N ' chaos '
UNION ALL SELECT ' Lue ', N ' 擽 '
UNION ALL SELECT ' Lun ', N ' theory '
UNION ALL select ' Luo ', N ' 鱳 '
UNION ALL SELECT ' ma ', N '
UNION ALL select ' Mai ', N ' 霢 '
UNION ALL SELECT ' Mans ', N ' 蘰 '
UNION ALL select ' Mang ', N ' 蠎 '
UNION ALL select ' Mao ', N ' 唜 '
UNION ALL select ' Me ', N ' 癦 '--癦 呅
UNION ALL select ' Mei ', N ' 嚜 '
UNION ALL SELECT ' Men ', N ' '
UNION ALL select ' Meng ', N ' 霥 '--霿 踎
UNION ALL SELECT ' mi ', N ' 羃 '
UNION ALL select ' Mian ', N ' noodle '
UNION ALL SELECT ' Miao ', N ' temples '
UNION ALL SELECT ' Mie ', N ' 鱴 '--鱴 瓱
UNION ALL Select ' min ', N ' 鰵 '
UNION ALL select ' Ming ', N ' 詺 '
UNION ALL SELECT ' Miu ', N ' absurd '
UNION ALL SELECT ' Mo ', N ' 耱 '--耱 乮
UNION ALL SELECT ' MoU ', N ' 麰 '--麰 蟱
UNION ALL Select ' Mu ', N ' temperature '
UNION ALL select ' Na ', N ' 魶 '
UNION ALL select ' Nai ', N ' neptunium '
UNION ALL select ' Nan ', N ' 婻 '
UNION ALL select ' Nang ', N ' 齉 '
UNION ALL SELECT ' Nao ', N ' 臑 '
UNION ALL SELECT ' ne ', N ' it '
UNION ALL SELECT ' Nei ', N ' 焾 '--tender 焾
UNION ALL SELECT ' nen ', N ' tender '
UNION ALL SELECT ' Neng ', N ' can '--莻 well 鈪 銰 stop
UNION ALL select ' Ni ', N ' 嬺 '
UNION ALL SELECT ' Nian ', N ' 艌 '
UNION ALL SELECT ' Niang ', N ' stuffed '
UNION ALL SELECT ' Niao ', N ' urea '
UNION ALL select ' nie ', N ' 钀 '
UNION ALL select ' Nin ', N ' 拰 '
UNION ALL select ' ning ', N ' 濘 '
UNION ALL select ' Niu ', N ' 靵 '
UNION ALL select ' Nong ', N ' 齈 '
UNION ALL select ' Nou ', N ' 譳 '
UNION ALL select ' Nu ', N ' 搙 '
UNION ALL SELECT ' NV ', N ' Nvxue '
UNION ALL SELECT ' Nue ', N ' malaria '
UNION ALL SELECT ' Nuan ', N ' 燶 '--硸 黁 燶 郍
UNION ALL SELECT ' Nuo ', N ' 桛 '
UNION ALL SELECT ' O ', N ' 鞰 '--毮 夞 乯 鞰
UNION ALL SELECT ' ou ', N ' 漚 '
UNION ALL SELECT ' Pa ', N ' 袙 '
UNION ALL select ' Pai ', N ' 磗 '--鎃 磗
UNION ALL SELECT ' Pan ', N ' 鑻 '
UNION ALL select ' Pang ', N ' fat '
UNION ALL select ' Pao ', N ' 礮 '
UNION ALL SELECT ' Pei ', N ' 轡 '
UNION ALL select ' Pen ', N ' 喯 '
UNION ALL select ' Peng ', N ' 喸 '--浌 巼 闏 乶
UNION ALL Select ' Pi ', N ' Grebe '
UNION ALL SELECT ' Pian ', N ' deceive '
UNION ALL SELECT ' Piao ', N ' 慓 '
UNION ALL SELECT ' Pie ', N ' 嫳 '
UNION ALL SELECT ' Pin ', N ' hire '
UNION ALL select ' Ping ', N ' Apple '
UNION ALL SELECT ' po ', N ' soul '
UNION ALL SELECT ' Pou ', N ' 哛 '--兺 哛
UNION ALL SELECT ' Pu ', N ' exposure '
UNION ALL select ' Qi ', N ' 蟿 '
UNION ALL SELECT ' QIA ', N ' iliac '
UNION ALL select ' Qian ', N ' 縴 '
UNION ALL select ' Qiang ', N ' kw '--羻 兛 kw
UNION ALL SELECT ' Qiao ', N ' 躈 '
UNION ALL SELECT ' Qie ', N ' 籡 '
UNION ALL select ' Qin ', N ' dear '
UNION ALL select ' Qing ', N ' 櫦 '
UNION ALL SELECT ' Qiong ', N ' 瓗 '
UNION ALL select ' Qiu ', N ' embarrassing '
UNION ALL select ' qu ', N ' 覻 '
UNION ALL select ' Quan ', N ' advise '
UNION ALL select ' que ', N ' 礭 '
UNION ALL SELECT ' Qun ', N ' 囕 '
UNION ALL select ' ran ', N ' 橪 '
UNION ALL select ' Rang ', N ' let '
UNION ALL SELECT ' Rao ', N ' surround '
UNION ALL SELECT ' re ', N ' heat '
UNION ALL select ' Ren ', N ' 餁 '
UNION ALL SELECT ' Reng ', N ' 陾 '
UNION ALL SELECT ' ri ', N ' 馹 '
UNION ALL select ' Rong ', N ' technical '
UNION ALL SELECT ' Rou ', N ' 嶿 '
UNION ALL select ' Ru ', N ' 擩 '
UNION ALL select ' Ruan ', N ' 礝 '
UNION ALL SELECT ' Rui ', N ' 壡 '
UNION ALL SELECT ' Run ', N ' 橍 '--橍 挼
UNION ALL SELECT ' Ruo ', N ' 鶸 '
UNION ALL SELECT ' sa ', N ' 栍 '--櫒 栍
UNION ALL SELECT ' Sai ', N ' 虄 '--簺 虄
UNION ALL select ' San ', N ' 閐 '
UNION ALL select ' sang ', N ' not '
UNION ALL select ' Sao ', N ' 髞 '
UNION ALL SELECT ' SE ', N ' 飋 '---shirt 聓
UNION ALL SELECT ' Sen ', N ' 篸 '
UNION ALL select ' Seng ', N ' 縇 '--閪 縇
UNION ALL select ' Sha ', N ' sharp '
UNION ALL SELECT ' Shai ', N ' 曬 '
UNION ALL select ' Shan ', N ' noodles eel noodles '
UNION ALL select ' Shang ', N ' 緔 '
UNION ALL select ' Shao ', N ' hogwash '
UNION ALL SELECT ' She ', N ' 欇 '
UNION ALL select ' Shen ', N ' 瘮 '
UNION ALL select ' Sheng ', N ' 賸 '
UNION ALL select ' Shi ', N ' 瓧 '--鰘 齛 兙 瓧
UNION ALL select ' Shou ', N ' 鏉 '
UNION ALL select ' Shu ', N ' 虪 '
UNION ALL SELECT ' Shua ', N ' 誜 '
UNION ALL SELECT ' Shuai ', N ' 卛 '
UNION ALL SELECT ' Shuan ', N ' 腨 '
UNION ALL SELECT ' Shuang ', N ' 灀 '
UNION ALL select ' Shui ', N ' sleep '
UNION ALL select ' Shun ', N ' 鬊 '
UNION ALL SELECT ' Shuo ', N ' 鑠 '
UNION ALL select ' Si ', N ' 乺 '--瀃 guarding 乺
UNION ALL select ' song ', N ' 鎹 '
UNION ALL select ' Sou ', N ' 瘶 '
UNION ALL select ' Su ', N ' 鷫 '
UNION ALL SELECT ' Suan ', N ' count '
UNION ALL select ' Sui ', N ' monitoring '
UNION ALL Select ' Sun ', N ' 潠 '
UNION ALL select ' suo ', N ' 蜶 '
UNION ALL SELECT ' Ta ', N ' 襨 '--躢 襨
UNION ALL select ' Tai ', N ' 燤 '
UNION ALL SELECT ' Tan ', N ' 賧 '
UNION ALL select ' Tang ', N ' hot '
UNION ALL select ' Tao ', N ' 畓 '--畓
UNION ALL select ' Te ', N ' 蟘 '
UNION ALL SELECT ' Teng ', N ' 朰 '--霯 唞 朰
UNION ALL select ' Ti ', N ' 趯 '
UNION ALL select ' Tian ', N ' 舚 '
UNION ALL SELECT ' Tiao ', N ' 糶 '
UNION ALL select ' tie ', N ' voracious '
UNION ALL select ' ting ', N ' 乭 '--濎 乭
UNION ALL select ' Tong ', N ' 憅 '
UNION ALL Select ' Tou ', N ' through '
UNION ALL select ' Tu ', N ' 鵵 '
UNION ALL select ' Tuan ', N ' 褖 '
UNION ALL select ' Tui ', N ' 駾 '
UNION ALL SELECT ' Tun ', N ' 坉 '
UNION ALL SELECT ' Tuo ', N ' 籜 '
UNION ALL select ' WA ', N ' 韤 '
UNION ALL select ' Wai ', N ' 顡 '
UNION ALL SELECT ' Wan ', N ' 贎 '
UNION ALL select ' Wang ', N ' reheated '
UNION ALL select ' Wei ', N ' 躛 '
UNION ALL select ' Wen ', N ' 璺 '
UNION ALL SELECT ' Weng ', N ' 齆 '
UNION ALL select ' Wo ', N ' 齷 '
UNION ALL SELECT ' Wu ', N ' 鶩 '
UNION ALL SELECT ' XI ', N ' 衋 '
UNION ALL select ' Xia ', N ' 鏬 '
UNION ALL select ' Xian ', N ' 鼸 '
UNION ALL select ' Xiang ', N ' 鱌 '
UNION ALL select ' Xiao ', N ' 斆 '
UNION ALL select ' Xie ', N ' 躞 '
UNION ALL select ' Xin ', N ' provocative '
UNION ALL select ' Xing ', N ' 臖 '
UNION ALL select ' Xiong ', N ' 敻 '
UNION ALL select ' Xiu ', N ' 齅 '
UNION ALL select ' Xu ', N ' off '
UNION ALL select ' Xuan ', N ' 贙 '
UNION ALL select ' Xue ', N ' 瀥 '
UNION ALL select ' Xun ', N ' 鑂 '
UNION ALL select ' Ya ', N ' 齾 '
UNION ALL select ' Yan ', N ' 灩 '
UNION ALL select ' Yang ', N ' like '
UNION ALL select ' Yao ', N ' keys '
UNION ALL select ' ye ', N ' accommodating '--鸈 膶 accommodating
UNION ALL Select ' Yi ', N ' 齸 '
UNION ALL select ' Yin ', N ' 檼 '
UNION ALL select ' Ying ', N ' 譍 '
UNION ALL Select ' Yo ', N ' yo '
UNION ALL select ' Yong ', N ' 醟 '
UNION ALL SELECT ' You ', N ' ferret '
UNION ALL select ' Yu ', N ' 爩 '
UNION ALL select ' yuan ', N ' willing '
UNION ALL select ' Yue ', N ' 鸙 '
UNION ALL select ' Yun ', N ' rhythmic '
UNION ALL select ' za ', N ' 雥 '
UNION ALL SELECT ' Zai ', N ' 縡 '
UNION ALL SELECT ' Zan ', N ' 饡 '
UNION ALL SELECT ' Zang ', N ' the ' heart '
UNION ALL SELECT ' Zao ', N ' 竈 '
UNION ALL select ' Ze ', N ' 稄 '
UNION ALL SELECT ' Zei ', N ' 鱡 '
UNION ALL SELECT ' Zen ', N ' 囎 '
UNION ALL select ' Zeng ', N ' donors '
UNION ALL SELECT ' Zha ', N ' winepress '
UNION ALL SELECT ' Zhai ', N ' 瘵 '
UNION ALL SELECT ' Zhan ', N ' 驏 '
UNION ALL select ' Zhang ', N ' 瞕 '
UNION ALL select ' Zhao ', N ' 羄 '
UNION ALL SELECT ' Zhe ', N ' 鷓 '
UNION ALL select ' Zhen ', N ' 黮 '
UNION ALL select ' Zheng ', N ' proof '
UNION ALL select ' Zhi ', N ' 豒 '
UNION ALL select ' Zhong ', N ' 諥 '
UNION ALL select ' Zhou ', N ' steps '
UNION ALL select ' Zhu ', N ' cast '
UNION ALL SELECT ' Zhua ', N ' claws '
UNION ALL SELECT ' Zhuai ', N ' Draco '
UNION ALL SELECT ' Zhuan ', N ' 籑 '
UNION ALL select ' Zhuang ', N ' 戅 '
UNION ALL SELECT ' Zhui ', N ' 鑆 '
UNION ALL SELECT ' Zhun ', N ' 稕 '
UNION ALL select ' Zhuo ', N ' 籱 '
UNION ALL select ' Zi ', N ' 漬 '--漬 唨
UNION ALL select ' Zong ', N ' manipulation '
UNION ALL SELECT ' Zou ', N ' 媰 '
UNION ALL select ' zu ', N ' 謯 '
UNION ALL SELECT ' Zuan ', N ' grip '
UNION ALL SELECT ' Zui ', N ' 欈 '
UNION ALL SELECT ' Zun ', N ' hygienic '
UNION ALL SELECT ' Zuo ', N ' out ') t
Where word >= @word collate Chinese_prc_cs_as_ks_ws
ORDER BY word ASC) Else @word end)
Set @i = @i + 1
End
Return @pinyin
End
Go
SELECT Dbo.fn_getpinyin (' People's Republic of China ')
/*
-------------------------------------------
Zuo Zhong hua ren min gong he guo
(1 rows affected)
*/