摘要:
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 阅读全文
摘要:
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 阅读全文