自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

獲取漢字字串的拼音聲母在SQL Server數(shù)據(jù)庫中

數(shù)據(jù)庫 SQL Server
我們今天主要向大家講述的是如何正確獲取漢字字串的拼音聲母在SQL Server數(shù)據(jù)庫中,以下就是文章的主要內(nèi)容的詳細(xì)介紹。

以下的文章主要向大家講述的是如何正確獲取漢字字串的拼音聲母在SQL Server數(shù)據(jù)庫中,此文主要是通過其實際操作代碼來引出其正確的操作步驟,以下就是實現(xiàn)其具體操作的內(nèi)容的描述,希望在你今后的學(xué)習(xí)中會有所幫助。

  1. CREATE function fGetPy(@str varchar(500)='')  
  2. returns varchar(500)  
  3. as  
  4. begin  
  5. declare @strlen int,@return varchar(500),@ii int  
  6. declare @c nchar(1),@chn nchar(1)  
  7. CREATE function fGetPy(@str varchar(500)='')  
  8. returns varchar(500)  
  9. as  
  10. begin  
  11. declare @strlen int,@return varchar(500),@ii int  
  12. declare @c nchar(1),@chn nchar(1)  
  13. select @strlen=len(@str),@return='',@ii=0 
  14. set @ii=0 
  15. while @ii<@strlen  
  16. begin  
  17. select @ii=@ii+1,@chn=substring(@str,@ii,1)  
  18. if @chn>='吖'  
  19. select @c = char(count(*)+63) from (  
  20. select top 27 * from (  
  21. select chn = '吖' 
  22. union all select '八'  
  23. union all select '嚓'  
  24. union all select '咑'  
  25. union all select '妸'  
  26. union all select '發(fā)'  
  27. union all select '旮'  
  28. union all select '鉿'  
  29. union all select '丌' --because have no 'i'  
  30. union all select '丌'  
  31. union all select '咔'  
  32. union all select '垃'  
  33. union all select '嘸'  
  34. union all select '拏'  
  35. union all select '噢'  
  36. union all select '妑'  
  37. union all select '七'  
  38. union all select '呥'  
  39. union all select '仨'  
  40. union all select '他'  
  41. union all select '屲' --no 'u'  
  42. union all select '屲' --no 'v'  
  43. union all select '屲'  
  44. union all select '夕'  
  45. union all select '丫'  
  46. union all select '帀'  
  47. union all select @chn  
  48. ) as a  
  49. order by chn COLLATE Chinese_PRC_CI_AS ) as b  
  50. where b.chn <=@chn  
  51. else set @c=@chn  
  52. set @return=@return+@c   
  53. end  
  54. return(@return)  
  55. end  

 

以上的相關(guān)內(nèi)容就是對SQL Server數(shù)據(jù)庫的介紹,望你能有所收獲。

【編輯推薦】

  1. SQL Server數(shù)據(jù)修復(fù)命令DBCC的使用
  2. SQL Server數(shù)據(jù)整理的操作方案描述
  3. SQL Server 易混淆的一些數(shù)據(jù)類型有哪些?
  4. SQL Server 日期操作全接觸,嘻嘻
  5. 對SQL Server 2005 BI的描述
責(zé)任編輯:佚名 來源: 51CTO
相關(guān)推薦

2010-07-09 17:07:14

SQL Server數(shù)

2010-07-01 16:52:53

SQL Server數(shù)

2010-07-21 17:02:35

SQL Server取

2023-08-01 09:30:12

SQL Server數(shù)據(jù)庫

2011-03-23 10:08:09

2011-08-10 09:12:44

SQL Server插入圖像存儲過程

2010-07-15 17:28:50

SQL Server

2010-09-06 16:07:21

SQL函數(shù)

2010-07-08 11:05:14

SQL Server數(shù)

2010-07-08 15:55:25

SQL Server

2011-03-28 12:33:09

SQL Server數(shù)據(jù)庫鏈接

2011-03-22 10:44:20

SQL Server數(shù)拆分字符串函數(shù)

2010-07-01 11:20:38

SQL Server

2010-06-17 13:34:47

SQL Server數(shù)

2009-04-30 09:28:05

SynonymOpenquerySQL Server

2011-08-25 16:13:31

SQL Server批量替換數(shù)據(jù)

2010-07-06 14:12:58

SQL Server數(shù)

2010-07-08 17:33:21

SQL Server數(shù)

2010-07-06 15:02:12

SQL Server

2011-03-11 14:36:56

SQL Server數(shù)
點贊
收藏

51CTO技術(shù)棧公眾號