回覆列表
  • 1 # 使用者7063786766555

    Create Function RmGetPY(@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) else @c end from(

    select top 27 * from (

    select chn =

    "吖" union all select

    "八" union all select

    "嚓" union all select

    "咑" union all select

    "妸" union all select

    "發" union all select

    "旮" union all select

    "鉿" union all select

    "丌" union all select

    "丌" union all select

    "咔" union all select

    "垃" union all select

    "嘸" union all select

    "拏" union all select

    "噢" union all select

    "妑" union all select

    "七" union all select

    "呥" union all select

    "仨" union all select

    "他" union all select

    "屲" union all select

    "屲" union all select

    "屲" union all select

    "夕" union all select

    "丫" union all select

    "帀" union all select @chn) as a

    order by chn COLLATE Chinese_PRC_CI_AS

    ) as b

    return(@c)

    end

    go

    Create Function GetAllPY(@chn nvarchar(100))

    returns varchar(30)

    as

    begin

    declare @i int,@j int,@result varchar(100)

    set @result=""

    set @i=len(@chn)

    set @j=1

    while @j<=@i

    begin

    set @result = @result + dbo.RmGetPY(substring(@chn,@j,1))

    set @j=@j+1

    end

    return @result

    end

    看看這兩個,典型的取漢字拼音碼的函式

  • 中秋節和大豐收的關聯?
  • 求一組vba程式碼,根據條件搜尋然後替換掉隔壁列的內容?