最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
sql中字符串分割函数
时间:2022-06-29 08:22:48 编辑:袖梨 来源:一聚教程网
| 代码如下 | 复制代码 |
|
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) |
|
相关文章
- 饿了么食安理赔入口在哪-饿了么食安理赔入口如何找 02-15
- 差差漫画秋蝉入口-秋蝉漫画免费阅读平台分享 02-15
- 樱花风车动漫下载手机版-樱花动漫APP官方下载安装入口 02-15
- 免费看片视频神器-免费看片必备软件推荐 02-15
- 手机快手网页版极速入口-手机快手网页版一键登录入口 02-15
- steam账号注册入口-steam官网注册入口 02-15