sql 生成拼间码的方法
来源:互联网 发布:seo技术主管招聘 编辑:程序博客网 时间:2024/05/12 08:12
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'鵽'
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'攈'
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'漚'
union all select 'P',N'曝'
union all select 'Q',N'囕'
union all select 'R',N'鶸'
union all select 'S',N'蜶'
union all select 'T',N'籜'
union all select 'W',N'鶩'
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
go
--
- sql 生成拼间码的方法
- SQL生成助记码的方法
- 导出数据、生成SQL INSERT的方法。
- SQL 生成随机数的基本方法
- sql 序号生成方法
- thinkphp如何查看方法自动sql生成的sql语句
- 执行动态生成的SQL语句的方法
- NHibernate 查看生成的sql语句的方法
- 动态生成SQL的存储过程,以及调用方法
- 基于作业调度生成事务预报的方法(sql server)
- 用动态生成SQL语句的方法处理数据
- 查看LINQ生成SQL语句的几种方法
- 查看LINQ生成SQL语句的几种方法
- C# 生成SQL文追加Where条件的方法
- 自动生成pl/sql工具配置的方法步骤
- Sql Server 生成连续日期的方法总结
- 根据Django Model动态生成sql的方法
- sql server生成临时表的快捷方法
- 初学smarty
- ASP.NET控制Word/EXCEL转换成PDF格式
- iBatisNet介绍
- 智能ABC中快速切换 输入特殊符号
- struts taglib
- sql 生成拼间码的方法
- SQL常用字符串函数(转载http://blog.sina.com.cn/s/blog_5e31641d0100cw3j.html)
- ASP.NET中对EXCEL文件进行操作!
- 去掉VC++2005、2008的安全警告提示
- 错误: 80040154
- Sql Server中通配符的使用(来源:http://hi.baidu.com/txm506/blog/item/58a84ecbe8fe551cbf09e67b.html)
- 原来我只是你的下一个背你过河的人
- 一个等待大师们帮忙优化的进销存报表存储过程
- a