sql 取汉字首字母】的更多相关文章

)) ) --用于加密 --WITH ENCRYPTION as begin declare @intLen int ) ) set @intLen = len(@str) set @strRet = '' begin set @temp = '' select @temp = case ) >= '帀' then 'Z' ) >= '丫' then 'Y' ) >= '夕' then 'X' ) >= '屲' then 'W' ) >= '他' then 'T' ) >…
汉字首字母查询处理用户定义函数 CREATE FUNCTION f_GetPY1(@str nvarchar(4000))RETURNS nvarchar(4000)ASBEGIN DECLARE @py TABLE( ch char(1), hz1 nchar(1) COLLATE Chinese_PRC_CS_AS_KS_WS, hz2 nchar(1) COLLATE Chinese_PRC_CS_AS_KS_WS) INSERT @py SELECT 'A',N'吖',N'鏊' UNIO…
1取汉字汉语拼音首字母: private static string GetFirstLetterOfChineseString(string CnChar) { long iCnChar; byte[] ZW = System.Text.Encoding.Default.GetBytes(CnChar); //如果是字母,则直接返回 if (ZW.Length == 1) { return CnChar.ToUpper(); } else { int i1 = (short)(ZW[0]);…
使用类库为 https://gitee.com/kuiyu/dotnetcodes/tree/master/DotNet.Utilities/%E6%B1%89%E5%AD%97%E8%BD%AC%E6%8B%BC%E9%9F%B3 取首字母 textBox2.Text = PinYin.GetCodstring(textBox1.Text); 取汉字全拼 EcanConvertToCh toCh = new EcanConvertToCh(); textBox3.Text = toCh.con…
有时候,可能会有一些类似这样的需求: 对于这样的效果,我们可以有类似这样的解决方案: package bys.utils; import java.io.UnsupportedEncodingException; /** * Created by toutou on 2014/2/21 */ public class ChineseCharacterHelper { static final int GB_SP_DIFF = 160; // 存放国标一级汉字不同读音的起始区位码 static f…
)) ) as begin ) ) collate Chinese_PRC_CI_AS,letter )) insert into @t(chr,letter) select '吖','A' union all select '八','B' union all select '嚓','C' union all select '咑','D' union all select '妸','E' union all select '发','F' union all select '旮','G' unio…
SELECT * FROM 表名 order by CONVERT(字段名 USING gbk)…
--创建取汉字首字母函数(第三版) create function [dbo].[f_getpy_V3] ( ) ) ) as begin ),) ,@len = len(@col),@sql = '' while @cyc <= @len begin ) as varbinary) ),ecode ),letter )) insert into @maco select 0XB0A1,0XB0C4,'A' union all select 0XB0C5,0XB2C0,'B' union all…
将汉字转为全拼,提取汉字首字母 <?php /** * 基于PHP语言的汉语转拼音的类 * 兼容 UTF8.GBK.GB2312 编码,无须特殊处理 * 对中文默认返回拼音首字母缩写,其它字符不作处理直接返回. * */ class py_class{ /** * 汉字拼音对照数组 * * @var array */ var $pinyin = array(); /** * 构造函数 * * @return py_class */ function py_class(){ $this->pin…
--获取全拼 DECLARE @str VARCHAR(max) SET @str= [dbo].[fn_Getquanpin]('中山') PRINT(@str) )) ) as begin ),) declare @strlen int select @strlen=len(@str),@re='' begin ) select @re= case when @crs<'吖' then @crs when @crs<='厑' then 'a' when @crs<='靉' then…