Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to obtain the Pinyin consonant of Chinese character string in sqlServer

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

How to get the pinyin consonant of Chinese character string in sqlServer, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

CREATE function fGetPy (@ str varchar) ='') returns varchar as begin declare @ strlen int,@return varchar, @ ii int declare @ c nchar (1), @ chn nchar (1) select @ strlen=len (@ str), @ return='' @ ii=0 set @ ii=0 while @ ii=' A 'select @ c = char (count (*) + 63) from (select top 27 * from (select chn =' A 'union all select' 8 'union all select' ZAM 'union all select' union all select''union all select' hair 'union all select', 'union all select' hafnium 'union all select'-- because have no 'i'union all select 'not' union all select 'union all select', 'union all select' union all' Select 'union all select' Oh, 'union all select', 'union all select', three 'union all select,' he 'union all select', no'u' union all select','no'v 'union all select', 'union all select' union all select, 'union all select', 'union all select @ chn) as an order by chn COLLATE Chinese_PRC_CI_AS) as b where b.chn

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report