06 2012 档案

摘要:create function [dbo].[SplitString]( @Input nvarchar(max), @Separator nvarchar(max)=',', @RemoveEmptyEntries bit=1 , @position int)returns @TABLE table ( [Id] int identity(1,1), [Value] nvarchar(max)) asbegin declare @Index int, @Entry nvarchar(max) set @Index = charindex(@Separator,@Input) 阅读全文
posted @ 2012-06-13 09:58 宁静.致远 阅读(133) 评论(0) 推荐(0)
摘要:SELECT Number,ApplyYear,CompanyNo,ContractNo FROM [Contract].[dbo].[Apply]update dbo.Apply set ApplyYear = '',CompanyNo = '',ContractNo='' where Number != ''declare cursor1 cursor for select Id,Number from [Contract].[dbo].[Apply] where Number != ''declare @id 阅读全文
posted @ 2012-06-13 09:33 宁静.致远 阅读(296) 评论(0) 推荐(0)
摘要: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 宁静.致远 阅读(304) 评论(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 宁静.致远 阅读(123) 评论(0) 推荐(0)