最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
取得一段汉语的每个字的首字母
时间:2022-07-02 12:05:51 编辑:袖梨 来源:一聚教程网
由于一个公司的OA上用到速查编码,必须得到每个字的首字母,便于以后的查询(如:开发部,则为KFB),到网上找到了一些资料,是一个存储过程。
存储过程为:
CREATE proc LOG_FindCode
@strName nvarchar(20),
@strFindCode nvarchar(20) output
as
begin
declare @word nchar(1),@PY nvarchar(4000)
set @PY=''
while len(@strName)>0
begin
set @word=left(@strName,1)
set @PY=@PY+(case when unicode(@word) between 19968 and 19968+20901
then (select top 1 PY from (
select 'A' as PY,N'
存储过程为:
CREATE proc LOG_FindCode
@strName nvarchar(20),
@strFindCode nvarchar(20) output
as
begin
declare @word nchar(1),@PY nvarchar(4000)
set @PY=''
while len(@strName)>0
begin
set @word=left(@strName,1)
set @PY=@PY+(case when unicode(@word) between 19968 and 19968+20901
then (select top 1 PY from (
select 'A' as PY,N'
相关文章
- 怎样开启phpStudy服务器 09-22
- 三分钟掌握PHP操作数据库 09-22
- Binance Windows 11 客户端怎么下载和安装? 09-22
- Binance Mac 版在哪里下载?桌面端安装步骤 09-22
- 币安电脑版官方下载教程:Windows 与 macOS 安装方法 09-22
- Binance App Download:Android、iPhone 和 PC 版本说明 09-22