create
function
[dbo].
[f_split](
@sourcesql
varchar
(8000
),@strseprate
varchar(10
))returns
@temp
table
(a varchar
(100
))as
begin
declare
@iint
set@sourcesql
=rtrim
(ltrim
(@sourcesql
))set@i
=charindex
(@strseprate
,@sourcesql
)while
@i>=
1begin
insert
@temp
values
(left
(@sourcesql,@i
-1))
set@sourcesql
=substring
(@sourcesql,@i
+1,len
(@sourcesql)-
@i)set@i
=charindex
(@strseprate
,@sourcesql
)end
if@sourcesql
<>'/
'insert
@temp
values
(@sourcesql
)return
end
SQL 字串分割函式
create function dbo split input varchar max split varchar max returns table table col varchar max as begin while charindex split,input 0 begin insert ...
分割字串的sql函式
create function stringtotable stringx varchar 8000 split nvarchar 10 returns tableresult table tableid nvarchar 100 as begin declare index int declare...
字串分割的函式Sql
files ajaxren 分隔字串.rar alter procedure sp split string string nvarchar 4000 要分割的字串 splitstring varchar 2000 中間的分割符 as begin declare object id nvarchar...