文件名称:splitA
- 所属分类:
- 数据库系统
- 资源属性:
- 上传时间:
- 2018-02-02
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- salon*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Alter FUNCTION [dbo].[split](@expression VarChar(max),@delimiter VarChar(30) = ' ')
RETURNS @TmpTable TABLE (RefNo VarChar(max))
AS
BEGIN
if rtrim(isnull(@expression,'')) > ''
begin
declare @cxml xml
set @cxml = '<x_k><![CDATA['+replace(@expression,@delimiter,']]></x_k><x_k><![CDATA[')+']]></x_k>'
insert into @TmpTable select ls.row.value('.[1]','varchar(max)') as refno--, identity(int,1,1) as idno
from @cxml.nodes('/x_k') as ls(row)
end
RETURN
END
GO(A SQL imitates the split function in VB to achieve a high efficiency by turning a text string into a data table.)
RETURNS @TmpTable TABLE (RefNo VarChar(max))
AS
BEGIN
if rtrim(isnull(@expression,'')) > ''
begin
declare @cxml xml
set @cxml = '<x_k><![CDATA['+replace(@expression,@delimiter,']]></x_k><x_k><![CDATA[')+']]></x_k>'
insert into @TmpTable select ls.row.value('.[1]','varchar(max)') as refno--, identity(int,1,1) as idno
from @cxml.nodes('/x_k') as ls(row)
end
RETURN
END
GO(A SQL imitates the split function in VB to achieve a high efficiency by turning a text string into a data table.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
split.sql | 44313 | 2018-02-02 |