SQL里面用自定义Split()完成个性化需求
代码如下: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE function [dbo].[SplitString] ( @Input nvarchar(max), @Separator nvarchar(max)=’,’, @RemoveEmptyEntries bit=1 ) returns @TABLE table ( [Id] int identity(1,1), [Value] nvarchar(max) ) as begin declare @Index int, @Entry nvarchar(max) set @I
下载地址
用户评论