摘要: Create table Tab([Col1] int,[Col2] nvarchar(1))Insert Tab select 1,N'a' union all select 1,N'b' union all select 1,N'c' union all select 2,N'd' union all select 2,N'e' union all select 3,N'f'create function F_Str(@Col1 int) returns nvarchar(100) asbegi 阅读全文
posted @ 2013-01-07 18:17 眯妖 阅读(236) 评论(0) 推荐(1) 编辑
摘要: create function GetPY(@str varchar(500))returns varchar(500)asbegin declare @cyc int,@length int,@str1 varchar(100),@charcate varbinary(20) set @cyc=1--从第几个字开始取 set @length=len(@str)--输入汉字的长度 set @str1=''--用于存放返回值 while @cyc<=@length begin select @charcate=cast(substring(@... 阅读全文
posted @ 2013-01-07 17:00 眯妖 阅读(4883) 评论(1) 推荐(0) 编辑