posts - 15,  comments - 6,  trackbacks - 0
公告

Create function fun_getPY
(
    @str nvarchar(4000)
)
returns nvarchar(4000)
as
begin
declare @word nchar(1),@PY nvarchar(4000)

set @PY=''

while len(@str)>0
begin
    set @word=left(@str,1)

    --如果非汉字字符,返回原字符
    set @PY=@PY+(case when unicode(@word) between 19968 and 19968+20901
  

阅读全文
类别:Sqlserver 查看评论
posted on 2008-03-14 16:06 Bob&xiaobo.liu 阅读(232) 评论(0) 编辑 收藏