Stored procedures 想了解存储过程中的split()吗

Stored procedures 想了解存储过程中的split()吗,stored-procedures,sageframe,Stored Procedures,Sageframe,上面的过程返回三行,中间为null 及 上面的代码返回的两行正是我想要的 我想知道split()函数为什么会影响我的结果 我先用**连接字符串,然后拆分,结果与用*连接的字符串不同。 编辑:split函数来自SageFrame忽略\*\*,我假设它应该是*** 我猜(我们不知道split函数是什么样子的)分隔符参数是char(1)(或者varchar(1))。这意味着**被截断为*,因此得到3行。拆分”是什么样子?为什么一个是*,另一个是\*\*? DECLARE @timeRange as v

上面的过程返回三行,中间为null

上面的代码返回的两行正是我想要的

我想知道split()函数为什么会影响我的结果

我先用
**
连接字符串,然后拆分,结果与用
*
连接的字符串不同。
编辑:split函数来自SageFrame

忽略
\*\*
,我假设它应该是
***

我猜(我们不知道split函数是什么样子的)分隔符参数是
char(1)
(或者
varchar(1)
)。这意味着
**
被截断为
*
,因此得到3行。

拆分”是什么样子?为什么一个是
*
,另一个是
\*\*
DECLARE @timeRange as varchar(max)
SET @timeRange= '00:30-01:00**00:20-01:00'

DECLARE @tblTime TABLE(RowNum int identity(1,1),TimeRange ntext)

INSERT INTO @tblTime SELECT rtrim(ltrim(items)) from split(@timeRange,'**')
select *from @tblTime
DECLARE @timeRange as varchar(max)
SET @timeRange= '00:30-01:00*00:20-01:00'

DECLARE @tblTime TABLE(RowNum int identity(1,1),TimeRange ntext)

INSERT INTO @tblTime SELECT rtrim(ltrim(items)) from split(@timeRange,'*')
select *from @tblTime