掃二維碼與項目經(jīng)理溝通
我們在微信上24小時期待你的聲音
解答本文疑問/技術咨詢/運營咨詢/技術建議/互聯(lián)網(wǎng)交流
以下的文章主要是對SQL Server數(shù)據(jù)庫中正確獲取漢字字串的拼音聲母的正確操作步驟的描述,假如你對SQL Server數(shù)據(jù)庫中正確獲取漢字字串的拼音聲母的正確操作步驟有興趣了解的話,你就可以瀏覽以下的文章了。

創(chuàng)新互聯(lián)自2013年創(chuàng)立以來,公司自成立以來始終致力于為企業(yè)提供官網(wǎng)建設、移動互聯(lián)網(wǎng)業(yè)務開發(fā)(微信小程序開發(fā)、手機網(wǎng)站建設、重慶APP開發(fā)公司等),并且包含互聯(lián)網(wǎng)基礎服務(域名、主機服務、企業(yè)郵箱、網(wǎng)絡營銷等)應用服務;以先進完善的建站體系及不斷開拓創(chuàng)新的精神理念,幫助企業(yè)客戶實現(xiàn)互聯(lián)網(wǎng)業(yè)務,嚴格把控項目進度與質(zhì)量監(jiān)控加上過硬的技術實力獲得客戶的一致贊譽。
- CREATE function fGetPy(@str varchar(500)='')
- returns varchar(500)
- as
- begin
- declare @strlen int,@return varchar(500),@ii int
- declare @c nchar(1),@chn nchar(1)
- CREATE function fGetPy(@str varchar(500)='')
- returns varchar(500)
- as
- begin
- declare @strlen int,@return varchar(500),@ii int
- declare @c nchar(1),@chn nchar(1)
- select @strlen=len(@str),@return='',@ii=0
- set @ii=0
- while @ii<@strlen
- begin
- select @ii=@ii+1,@chn=substring(@str,@ii,1)
- if @chn>='吖'
- select @c = char(count(*)+63) from (
- select top 27 * from (
- select chn = '吖'
- union all select '八'
- union all select '嚓'
- union all select '咑'
- union all select '妸'
- union all select '發(fā)'
- union all select '旮'
- union all select '鉿'
- union all select '丌' --because have no 'i'
- union all select '丌'
- union all select '咔'
- union all select '垃'
- union all select '嘸'
- union all select '拏'
- union all select '噢'
- union all select '妑'
- union all select '七'
- union all select '呥'
- union all select '仨'
- union all select '他'
- 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 a
- order by chn COLLATE Chinese_PRC_CI_AS ) as b
- where b.chn <=@chn
- else set @c=@chn
- set @return=@return+@c
- end
- return(@return)
- end
以上的相關內(nèi)容就是對SQL Server數(shù)據(jù)庫中獲取漢字字串的拼音聲母的介紹,望你能有所收獲。
【編輯推薦】

我們在微信上24小時期待你的聲音
解答本文疑問/技術咨詢/運營咨詢/技術建議/互聯(lián)網(wǎng)交流