日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產(chǎn)品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
SQLServer取漢字拼音的函數(shù)展示

此文章主要介紹的是SQL Server取漢字拼音的函數(shù),如果你對SQL Server取漢字拼音的函數(shù)心存好奇的話,以下的文章將會揭開它的神秘面紗,以下就是文章的詳細內(nèi)容介紹,望大家借鑒。

 
 
 
  1. Create function fun_getPY 
  2. @str nvarchar(4000) 
  3. returns nvarchar(4000) 
  4. as 
  5. begin 
  6. declare @word nchar(1),@PY nvarchar(4000) 
  7. set @PY='' 
  8. while len(@str)>0 
  9. begin 
  10. set @word=left(@str,1) 

如果非漢字字符,返回原字符

 
 
 
  1. set @PY=@PY+(case when unicode(@word) between 19968 and 19968+20901 
  2. then ( 
  3. select top 1 PY 
  4. from 
  5. select 'A' as PY,N'驁' as word 
  6. union all select 'B',N'簿' 
  7. union all select 'C',N'錯' 
  8. union all select 'D',N'鵽' 
  9. union all select 'E',N'樲' 
  10. union all select 'F',N'鰒' 
  11. union all select 'G',N'腂' 
  12. union all select 'H',N'夻' 
  13. union all select 'J',N'攈' 
  14. union all select 'K',N'穒' 
  15. union all select 'L',N'鱳' 
  16. union all select 'M',N'旀' 
  17. union all select 'N',N'桛' 
  18. union all select 'O',N'漚' 
  19. union all select 'P',N'曝' 
  20. union all select 'Q',N'囕' 
  21. union all select 'R',N'鶸' 
  22. union all select 'S',N'蜶' 
  23. union all select 'T',N'籜' 
  24. union all select 'W',N'鶩' 
  25. union all select 'X',N'鑂' 
  26. union all select 'Y',N'韻' 
  27. union all select 'Z',N'咗' 
  28. ) T 
  29. where word>=@word collate Chinese_PRC_CS_AS_KS_WS 
  30. order by PY ASC 
  31. else @word 
  32. end) 
  33. set @str=right(@str,len(@str)-1) 
  34. end 
  35. return @PY 
  36. end

以上的相關內(nèi)容就是對SQL Server取漢字拼音的函數(shù)的介紹,望你能有所收獲。


本文標題:SQLServer取漢字拼音的函數(shù)展示
瀏覽地址:http://www.5511xx.com/article/dpohsic.html