SQL中文转拼音】的更多相关文章

http://blog.csdn.net/zhanglong_longlong/article/details/46772571 --可支持大字符集20000个汉字! create function f_ch2py(@chn nchar(1)) returns char(1) as begin declare @n int declare @c char(1) set @n = 63 select @n = @n +1, @c = case chn when @chn then char(@n)…
使用下方的函数.. 忘了从哪抄的了..留存一份 如果只要首字母..建议将数据  Left(tableFiled,1) 后传入函数 如果字段是空或者null, 不会报错..返回空 方法体: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[F_SYS_getPY] ( ) ) ) AS BEGIN ),) SET @PY='' BEGIN ) PY FROM ( SELECT 'A' AS PY,N'驁'…
SQL 用中文的拼音和笔画排序   城市按拼音排序: SELECT chineseName FROM [表名] order by chinesename collate Chinese_PRC_CS_AS_KS_WS asc 城市按笔划排序: SELECT chineseName FROM [表名] order by chinesename collate Chinese_PRC_Stroke_CS_AS_KS_WS   asc 以上代码中GD上调试通过. 多说两句,排序规则名称由两部份构成,前…
SQL汉字转拼音函数-支持首字母.全拼 FROM :http://my.oschina.net/ind/blog/191659 作者不详 --方法一sqlserver汉字转拼音首字母 --调用方法 select dbo.procGetPY ('中國') Create FUNCTION dbo.procGetPY ( ) ) /* select dbo. procGetPYFirstLetter ('中國') */ ) --WITH ENCRYPTION AS BEGIN ),) SET @PY=…
C#中文转换为拼音NPinyin代码  在Mono 3.2下运行正常,Spacebuilder 有使用到NPinyin组件,代码兼容性没有问题. using System; using System.Collections.Generic; using System.Text; using NPinyin; namespace NPinyinTest { class Program { static void Main(string[] args) { string[] maxims = new…
用来得到中文的首字母: 这个是将中文转换为拼音的类:charset <?php/*** 汉字转化为拼音,拼音转化为汉字**/ class charset{private $_code=array(array("a",'-20319'),array("ai",'-20317'),array("an",'-20304'),array("ang",'-20295'),array("ao",'-20292')…
//php获取中文字符拼音首字母 function getFirstCharter($str){ if(empty($str)){return '';} $fchar=ord($str{}); }); $s1=iconv('UTF-8','gb2312',$str); $s2=iconv('gb2312','UTF-8',$s1); $s=$s2==$str?$s1:$str; $asc=ord($s{})*+ord($s{})-; &&$asc<=-) return 'A'; &a…
PL/SQL中文显示都显示成“?”的问题  首先我在sqlplus里面查询到的中文是正常的,然后再oracle里面的注册表里面看得nls_lang是SIMPLIFIED CHINESE_CHINA.ZHS16GBK. 执行select * from V$NLS_PARAMETERS看到的value项中不是SIMPLIFIED CHINESE: 所以进行 双击我的电脑,在空白处右键,属性,“高级”选项卡,点击环境变量, 在系统变量处点击“新建”,设置变量名:NLS_LANG ,  变量值:SIMP…
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SU { /// <summary> /// 中文转拼音 /// </summary> public class PinYin { #region 字符集 private static readonly string[] _charIndex = new string[] { "1&…
Mono 3.2 测试NPinyin 中文转换拼音代码   C#中文转换为拼音NPinyin代码  在Mono 3.2下运行正常,Spacebuilder 有使用到NPinyin组件,代码兼容性没有问题. using System; using System.Collections.Generic; using System.Text; using NPinyin; namespace NPinyinTest { class Program { static void Main(string[]…