摘要: Create function [dbo].[SplitString]( @Input nvarchar(max), @Separator nvarchar(max)=',', @RemoveEmptyEntries bit=1 )returns @TABLE table ( [Id] int identity(1,1), [Value] nvarchar(max)) asbegin declare @Index int, @Entry nvarchar(max) set @Index = charindex(@Separator,@Input) declare @count 阅读全文
posted @ 2012-06-11 16:37 宁静.致远 阅读(292) 评论(0) 推荐(0) 编辑
摘要: declare cursor1 cursor for select Id,Number from [Contract].[dbo].[Apply] where Number != null or Number != ''declare @id uniqueidentifier;declare @number nchar(20); declare @year nchar(10);declare @companyno nchar(10);declare @contractno int;open cursor1; fetch next from cursor1 into @id,@n 阅读全文
posted @ 2012-06-11 16:35 宁静.致远 阅读(117) 评论(0) 推荐(0) 编辑