|
| |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
Create function fun_getPY ( @str nvarchar(4000) ) returns nvarchar(4000) as begin declare @word nchar(1),@PY nvarchar(4000) set @PY=\\\'\\\' while len(@str)>0 begin set @word=left(@str,1) --假如非汉字字符,返回原字符 set @PY=@PY+(case when unicode(@word) between 19968 and 19968+20901 then ( select top 1 PY from ( select \\\'A\\\' as PY,N\\\'??\\\' as word union all select \\\'B\\\',N\\\'簿\\\' union all select \\\'C\\\',N\\\'邋\\\' union all select \\\'D\\\',N\\\'?z\\\' union all select \\\'E\\\',N\\\'?捃\\' union all select \\\'F\\\',N\\\'鲻\\\' union all select \\\'G\\\',N\\\'穆\\\' union all select \\\'H\\\',N\\\'??\\\' union all select \\\'J\\\',N\\\'?h\\\' union all select \\\'K\\\',N\\\'烽\\\' union all select \\\'L\\\',N\\\'鼢\\\' union all select \\\'M\\\',N\\\'?孳\\' union all select \\\'N\\\',N\\\'??\\\' union all select \\\'O\\\',N\\\'?a\\\' union all select \\\'P\\\',N\\\'曝\\\' union all select \\\'Q\\\',N\\\'?蒈\\' union all select \\\'R\\\',N\\\'?U\\\' union all select \\\'S\\\',N\\\'我\\\' union all select \\\'T\\\',N\\\'回\\\' union all select \\\'W\\\',N\\\'?F\\\' union all select \\\'X\\\',N\\\'枰\\\' union all select \\\'Y\\\',N\\\'??\\\' union all select \\\'Z\\\',N\\\'??\\\' ) T where word>=@word collate Chinese_PRC_CS_AS_KS_WS order by PY ASC ) else @word end) set @str=right(@str,len(@str)-1) end return @PY end 返回类别: 教程 上一教程: 用SQL SERVER为WEB浏览器提供图像(一) 下一教程: 在SELECT语句中使用TOP的一些小技巧 您可以阅读与"取汉字拼音首字母的存储过程"相关的教程: · 取汉字拼音首字母的存储过程 · 取得拼音字头的存储过程 · 将表数据生成SQL脚本的存储过程 · 将表数据生成SQL脚本的存储过程 · 关于值班治理的存储过程 |
| 快精灵印艺坊 版权所有 |
首页 |
||