zoukankan      html  css  js  c++  java
  • SQL Server 获取汉语拼音简码

    alter FUNCTION FB_GetChineseSpell
    (
        
    @Str   varchar(500)=''
    )
    RETURNS  varchar(500)
    as   
      
    begin   
        
    declare @strLen int
        
    declare @index int
        
    declare @VChControl char(2)
        
    DECLARE @VChSpell VARCHAR(30)
        
    declare @return varchar(500)
        
    set @return=''
        
    set @strlen=len(@str)
        
    set @index=1
        
    while @index<=@strlen
        
    begin
            
    select @VChControl=substring(@str,@index,1)
             
    IF @VChControl>'' AND @VChControl<'' 
                
    SELECT @VChSpell='A'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='B'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='C'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='D'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='E'
            
    ELSE IF @VChControl>='' AND @VChControl<=''
                
    SELECT @VChSpell='F'
            
    ELSE IF @VChControl>'' AND @VChControl<'' 
                
    SELECT @VChSpell='G'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='H'
            
    ELSE IF @VChControl>='' AND @VChControl<''
                
    SELECT @VChSpell='J'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='K'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='L'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='M'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='N'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='O'
            
    ELSE IF @VChControl>='' AND @VChControl<''
                
    SELECT @VChSpell='P'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='Q'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='R'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='S'
            
    ELSE IF @VChControl>='' AND @VChControl<''
                
    SELECT @VChSpell='T'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='W'
            
    ELSE IF @VChControl>='' AND @VChControl<''
                
    SELECT @VChSpell='X'
            
    ELSE IF @VChControl>='' AND @VChControl<'' 
                
    SELECT @VChSpell='Y'
            
    ELSE IF @VChControl>='' AND @VChControl<='' 
                
    SELECT @VChSpell='Z'
            
    ELSE
                
    SELECT @VChSpell=@VChControl

            
    SELECT @return=@return + RTRIM(UPPER(@VChSpell))
            
    set @index=@index+1
        
    end
      
    return(@return)   
      
    end
  • 相关阅读:
    Office Shared-Addin : Favorite的下载、安装和使用(2020.2.22)
    VBA编程常用词汇英汉对照表
    Excel-DNA自定义函数的参数智能提示功能:ExcelDna.IntelliSense1.1.0.rar
    VSTO开发中级教程 配套资源下载
    TreeviewEditor.rar
    FaceIDViewer.rar
    imageMso7345.rar
    VisualStudioAddin2016Setup.rar
    VBE2014_Setup_20160709.rar
    documen.write 和 innerHTML 的区别?
  • 原文地址:https://www.cnblogs.com/cpine/p/2123969.html
Copyright © 2011-2022 走看看