| 代码如下 | 复制代码 |
|
SET ANSI_NULLS ON /*by kudychen 2011-9-28 */ while (@Index>0) if (@RemoveEmptyEntries=0) or (@RemoveEmptyEntries=1 and @Entry'') set @Input = substring(@Input, @Index+datalength(@Separator)/2, len(@Input)) set @Entry=ltrim(rtrim(@Input)) end |
|
Test Code:
| 代码如下 | 复制代码 |
|
declare @str1 varchar(max), @str2 varchar(max), @str3 varchar(max) set @str1 = '1,2,3' select [Value] from [dbo].[SplitString](@str1, ',', 1) |
|
Code:
| 代码如下 | 复制代码 |
|
SET ANSI_NULLS ON /*by kudychen 2011-9-28 */ while (@Index>0) if (@RemoveEmptyEntries=0) or (@RemoveEmptyEntries=1 and @Entry'') set @Input = substring(@Input, @Index+datalength(@Separator)/2, len(@Input)) set @Entry=ltrim(rtrim(@Input)) end |
|
Test Code:
| 代码如下 | 复制代码 |
|
declare @str1 varchar(max), @str2 varchar(max), @str3 varchar(max) set @str1 = '1,2,3' select [Value] from [dbo].[SplitString](@str1, ',', 1) |
|
Linux如何给文件权限? linux给文件添加可执行权限的技巧
deepin20桌面图标样式怎么修改? deepin更换图标主题的技巧
virtualbox打不开虚拟机怎么办? linux无法访问virtualbox的解决办法
deepin怎么注销系统? deepin系统注销与切换用户的方法
Manjaro linux怎么调鼠标速度? Manjaro鼠标设置光标速度的技巧
Kali Linux鼠标光主题怎么修改? 修改鼠标光标主题的技巧