sql server获取汉字首字母的函数(第四版)
本文导语: sql server获取汉字首字母的函数(第四版) ,供大家学习参考。 代码如下: --取得汉字首字母 create function [dbo].[f_getpy_V4] ( @col varchar(1000) ) returns varchar(1000) begin declar...
sql server获取汉字首字母的函数(第四版) ,供大家学习参考。
--取得汉字首字母
create function [dbo].[f_getpy_V4]
(
@col varchar(1000)
)
returns varchar(1000)
begin
declare @cyc int,@len int,@sql varchar(1000),@char varbinary(20)
select @cyc = 1,@len = len(@col),@sql = ''
while @cyc =0XB0A1 and @char=0XB0C5 and @char=0XB2C1 and @char=0XB4EE and @char=0XB6EA and @char=0XB7A2 and @char=0XB8C1 and @char=0XB9FE and @char=0XBBF7 and @char=0XBFA6 and @char=0XC0AC and @char=0XC2E8 and @char=0XC4C3 and @char=0XC5B6 and @char=0XC5BE and @char=0XC6DA and @char=0XC8BB and @char=0XC8F6 and @char=0XCBFA and @char=0XCDDA and @char=0XCEF4 and @char=0XD1B9 and @char=0XD4D1 and @char