SQL Scalar-valued function to convert Chinese characters to pinyin without phonetic transcription

Source: Internet
Author: User
Tags scalar

Use [Db_test]
GO

SET ANSI_NULLS on
GO

SET QUOTED_IDENTIFIER ON
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 through characters
Begin
Set @word = substring (@words, @i, 1)
Set @unicode = Unicode (@word)
Set @pinyin = ISNULL (@pinyin +space (1), ") +
(case where 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 ' gloom '
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 ' issuers '
UNION ALL select ' CE ', N ' 簎 '
UNION ALL SELECT ' cen ', N ' 笒 '
UNION ALL SELECT ' CEng ', N ' 乽 '--footprint 硳 岾 猠 乽
UNION ALL select ' Cha ', N ' surprised '
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 ' scales '
UNION ALL select ' Chi ', N ' SARS '
UNION ALL select ' Chong ', N ' bayonets '
UNION ALL select ' Chou ', N ' 殠 '
UNION ALL select ' Chu ', N ' Chu '
UNION ALL SELECT ' Chuai ', N ' kick '
UNION ALL select ' Chuan ', N ' 鶨 '
UNION ALL SELECT ' Chuang ', N ' compromised '
UNION ALL select ' Chui ', N ' TVB '
UNION ALL SELECT ' Chun ', N ' stupid '
UNION ALL SELECT ' Chuo ', N ' 縒 '
UNION ALL select ' CI ', N ' 嗭 '--嗭
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 ' tartare '
UNION ALL select ' Dai ', N ' 靆 '
UNION ALL SELECT ' Dan ', N ' 饏 '
UNION ALL SELECT ' Dang ', N ' 闣 '
UNION ALL SELECT ' DAO ', N ' Ttukseom '
UNION ALL select ' de ', N ' '
UNION ALL Select ' Den ', N ' relate '
UNION ALL select ' Deng ', N ' 鐙 '
UNION ALL select ' di ', N ' di '
UNION ALL SELECT ' Dia ', N ' satay '
UNION ALL SELECT ' Dian ', N ' Hida '
UNION ALL SELECT ' Diao ', N ' 鑃 '
UNION ALL Select ' die ', N ' disadvantages '--眰 disadvantages
UNION ALL select ' Ding ', N ' 顁 '
UNION ALL SELECT ' Diu ', N ' being '
UNION ALL select ' Dong ', N ' 霘 '
UNION ALL SELECT ' Dou ', N ' fightings '
UNION ALL select ' du ', N ' beetle '
UNION ALL select ' Duan ', N ' disconnecting '--籪 disconnecting
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 ' snap '
UNION ALL SELECT ' Eng ', N ' eng '
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 ' Manta '
UNION ALL select ' Feng ', N ' lease '
UNION ALL SELECT ' fo ', N ' 梻 '
UNION ALL select ' Fou ', N ' 鴀 '
UNION ALL select ' Fu ', N ' 猤 '--鰒 猤
UNION ALL SELECT ' GA ', N ' embarrassing '
UNION ALL select ' Gai ', N ' Amager '
UNION ALL select ' Gan ', N ' unconsciously '
UNION ALL select ' Gang ', N ' idiot '
UNION ALL select ' Gao ', N ' 鋯 '
UNION ALL SELECT ' GE ', N ' 獦 '
UNION ALL SELECT ' GEi ', N ' to '
UNION ALL select ' Gen ', N ' 搄 '
UNION ALL SELECT ' Geng ', N ' 堩 '--mutual benefit 堩 啹 Worcestershire 一嗰
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 ' Harvest '
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 ' 堼 '--堼 db
UNION ALL SELECT ' Hong ', N ' Kachidoki '
UNION ALL select ' Hou ', N ' 鱟 '
UNION ALL select ' Hu ', N ' 鸌 '
UNION ALL select ' Hua ', N ' 蘳 '
UNION ALL SELECT ' Huai ', N ' ahead '
UNION ALL select ' Huan ', N ' 鰀 '
UNION ALL select ' Huang ', N ' 鎤 '
UNION ALL select ' hui ', N ' 顪 '
UNION ALL SELECT ' Hun ', N ' messing '
UNION ALL select ' Huo ', N ' inceѕt '
UNION ALL select ' Ji ', N ' Tianji '
UNION ALL SELECT ' Jia ', N ' 嗧 '
UNION ALL select ' Jian ', N ' energy '
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 ' competitive '
UNION ALL SELECT ' Jiong ', N ' 蘔 '
UNION ALL SELECT ' JIU ', N ' downloading '
UNION ALL select ' Ju ', N ' Choky '
UNION ALL SELECT ' Juan ', N ' infallible '
UNION ALL SELECT ' Jue ', N ' event '
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 ' 鏗 '--protection 乬 唟 厼 Micky
UNION ALL SELECT ' Kong ', N ' on '
UNION ALL SELECT ' Kou ', N ' case '
UNION ALL select ' Ku ', N ' 嚳 '
UNION ALL SELECT ' Kua ', N ' hip '
UNION ALL SELECT ' Kuai ', N ' Yoshikazu '
UNION ALL select ' Kuan ', N ' rejuvenate '
UNION ALL SELECT ' Kuang ', N ' minerologists '
UNION ALL SELECT ' Kui ', N ' 鑎 '
UNION ALL select ' Kun ', N ' leaned '
UNION ALL select ' Kuo ', N ' 穒 '
UNION ALL select ' La ', N ' 鞡 '
UNION ALL select ' Lai ', N ' celestial '
UNION ALL SELECT ' LAN ', N ' centered '
UNION ALL select ' Lang ', N ' 唥 '
UNION ALL select ' Lao ', N ' 軂 '
UNION ALL select ' Le ', N ' 餎 '
UNION ALL select ' Lei ', N ' lei '--Lei
UNION ALL select ' Leng ', N ' 睖 '
UNION ALL select ' Li ', N ' glasswear '
UNION ALL SELECT ' Lia ', N ' synchronicity '
UNION ALL select ' Lian ', N ' supply '
UNION ALL select ' Liang ', N ' blueåyfine '
UNION ALL select ' Liao ', N ' understanding '
UNION ALL select ' Lie ', N ' lap '
UNION ALL select ' Lin ', N ' 轥 '--轥 carrying
UNION ALL select ' Ling ', N ' 炩 '
UNION ALL select ' Liu ', N ' 瓼 '--甅 children
UNION ALL select ' Long ', N ' 贚 '
UNION ALL select ' Lou ', N ' 鏤箜you '
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 ' well '
UNION ALL select ' Mai ', N ' 霢 '
UNION ALL SELECT ' Man ', N ' 蘰 '
UNION ALL select ' Mang ', N ' constrictor '
UNION ALL select ' Mao ', N ' 唜 '
UNION ALL select ' Me ', N ' removal '--removal bites
UNION ALL select ' Mei ', N ' girls '
UNION ALL SELECT ' Men ', N ' '
UNION ALL select ' Meng ', N ' 霥 '--霿 踎
UNION ALL SELECT ' mi ', N ' desk '
UNION ALL select ' Mian ', N ' noodles '
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 ' absurdity '
UNION ALL SELECT ' Mo ', N ' leveling '--leveling 乮
UNION ALL SELECT ' MoU ', N ' make '--make 蟱
UNION ALL Select ' Mu ', N ' temperature '
UNION ALL select ' Na ', N ' Ghana '
UNION ALL select ' Nai ', N ' neptunium '
UNION ALL select ' Nan ', N ' 婻 '
UNION ALL select ' Nang ', N ' snuffle '
UNION ALL SELECT ' Nao ', N ' 臑 '
UNION ALL SELECT ' ne ', N '
UNION ALL SELECT ' Nei ', N ' 焾 '--tender 焾
UNION ALL SELECT ' nen ', N ' tender '
UNION ALL SELECT ' Neng ', N ' can '--莻, bangle 銰 adapts
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 ' FAI '
UNION ALL select ' Nin ', N ' Samhwapaint '
UNION ALL select ' ning ', N ' dirt '
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 ' epistaxis '
UNION ALL SELECT ' Nue ', N ' malarial '
UNION ALL SELECT ' Nuan ', N ' endangered '--from 黁 endangered 郍
UNION ALL SELECT ' Nuo ', N ' 桛 '
UNION ALL SELECT ' O ', N ' 鞰 '--毮 Press 乯 鞰
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 ' terrific '
UNION ALL SELECT ' Pie ', N ' errno '
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 ' ground '
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 ' embarrass '
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 ' Haokun '
UNION ALL select ' Rang ', N ' let '
UNION ALL SELECT ' Rao ', N ' surround '
UNION ALL SELECT ' re ', N ' hot '
UNION ALL select ' Ren ', N ' cooking '
UNION ALL SELECT ' Reng ', N ' 陾 '
UNION ALL SELECT ' ri ', N ' 馹 '
UNION ALL select ' Rong ', N ' Finalize '
UNION ALL SELECT ' Rou ', N ' 嶿 '
UNION ALL select ' Ru ', N ' trousers '
UNION ALL select ' Ruan ', N ' 礝 '
UNION ALL SELECT ' Rui ', N ' 壡 '
UNION ALL SELECT ' Run ', N ' frames '--frames creases
UNION ALL SELECT ' Ruo ', N ' 鶸 '
UNION ALL SELECT ' sa ', N ' ground '--controller ground
UNION ALL SELECT ' Sai ', N ' 虄 '--Switches 虄
UNION ALL select ' San ', N ' 閐 '
UNION ALL select ' sang ', N ' '
UNION ALL select ' Sao ', N ' 髞 '
UNION ALL SELECT ' SE ', N ' 飋 '--shirts 聓
UNION ALL SELECT ' Sen ', N ' ginseng '
UNION ALL select ' Seng ', N ' 縇 '--蒋万山 縇
UNION ALL select ' Sha ', N ' sharp '
UNION ALL SELECT ' Shai ', N ' herbs '
UNION ALL select ' Shan ', N ' eel '
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 ' calculations '
UNION ALL select ' Shi ', N ' 瓧 '--鰘 齛 兙 瓧
UNION ALL select ' Shou ', N ' æ '
UNION ALL select ' Shu ', N ' hygiene '
UNION ALL SELECT ' Shua ', N ' 誜 '
UNION ALL SELECT ' Shuai ', N ' 卛 '
UNION ALL SELECT ' Shuan ', N ' 腨 '
UNION ALL SELECT ' Shuang ', N ' terriers '
UNION ALL select ' Shui ', N ' sleep '
UNION ALL select ' Shun ', N ' 鬊 '
UNION ALL SELECT ' Shuo ', N ' surviving '
UNION ALL select ' Si ', N ' Dasol '--瀃 guarding Dasol
UNION ALL select ' song ', N ' is '
UNION ALL select ' Sou ', N ' configures '
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 ' boiling '
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 ' autopilot '
UNION ALL select ' tie ', N ' voracious '
UNION ALL select ' ting ', N ' sedol '--濎 Sedol
UNION ALL select ' Tong ', N ' 憅 '
UNION ALL Select ' Tou ', N ' penetrate '
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 ' spreads '
UNION ALL select ' Wai ', N ' 顡 '
UNION ALL SELECT ' Wan ', N ' 贎 '
UNION ALL select ' Wang ', N ' leftover '
UNION ALL select ' Wei ', N ' 躛 '
UNION ALL select ' Wen ', N ' confirming '
UNION ALL SELECT ' Weng ', N ' 齆 '
UNION ALL select ' Wo ', N ' are '
UNION ALL SELECT ' Wu ', N ' clamoring '
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 ' Christianity '
UNION ALL select ' Xie ', N ' Myeongdong station '
UNION ALL select ' Xin ', N ' provocative '
UNION ALL select ' Xing ', N ' provocative '
UNION ALL select ' Xiong ', N ' biweekly '
UNION ALL select ' Xiu ', N ' 齅 '
UNION ALL select ' Xu ', N ' Ruthenica '
UNION ALL select ' Xuan ', N ' stormwater '
UNION ALL select ' Xue ', N ' 瀥 '
UNION ALL select ' Xun ', N ' 鑂 '
UNION ALL select ' Ya ', N ' 齾 '
UNION ALL select ' Yan ', N ' waves '
UNION ALL select ' Yang ', N ' like '
UNION ALL select ' Yao ', N ' keys '
UNION ALL select ' ye ', N ' accommodating '--鸈 can accommodating
UNION ALL Select ' Yi ', N ' 齸 '
UNION ALL select ' Yin ', N ' 檼 '
UNION ALL select ' Ying ', N ' competetion '
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 ' Wan Leng '
UNION ALL select ' za ', N ' pull '
UNION ALL SELECT ' Zai ', N ' 縡 '
UNION ALL SELECT ' Zan ', N ' 饡 '
UNION ALL SELECT ' Zang ', N ' '
UNION ALL SELECT ' Zao ', N ' ovens '
UNION ALL select ' Ze ', N ' 稄 '
UNION ALL SELECT ' Zei ', N ' 鱡 '
UNION ALL SELECT ' Zen ', N ' 囎 '
UNION ALL select ' Zeng ', N ' giveaway '
UNION ALL SELECT ' Zha ', N ' winepress '
UNION ALL SELECT ' Zhai ', N ' partners '
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 ' gloom '
UNION ALL select ' Zheng ', N ' certificate '
UNION ALL select ' Zhi ', N ' 豒 '
UNION ALL select ' Zhong ', N ' AF '
UNION ALL select ' Zhou ', N '
UNION ALL select ' Zhu ', N ' cast '
UNION ALL SELECT ' Zhua ', N ' claw '
UNION ALL SELECT ' Zhuai ', N ' Draco '
UNION ALL SELECT ' Zhuan ', N ' tickes '
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 ' marinade '--marinade 唨
UNION ALL select ' Zong ', N '
UNION ALL SELECT ' Zou ', N ' 媰 '
UNION ALL select ' zu ', N ' 謯 '
UNION ALL SELECT ' Zuan ', N ' clutched '
UNION ALL SELECT ' Zui ', N ' 欈 '
UNION ALL SELECT ' Zun ', N ' hygienic '
UNION ALL SELECT ' Zuo ', N ' off ') 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 (' I Am a Fat sea ')--must add the dbo

SQL Scalar-valued function to convert Chinese characters to pinyin without phonetic transcription

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.