摘要: 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 宁静.致远 阅读(132) 评论(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 宁静.致远 阅读(293) 评论(0) 推荐(0)