===============
-- Description: 把字符串分割到一个表中
================
CREATE FUNCTION [dbo].[uf_split_string]
(
@in_str varchar(MAX),
@split varchar(1)
)
RETURNS
@strs TABLE
(
c_str varchar(100)
)
AS
BEGIN
select @in_str=ltrim(rtrim(isnull(@in_str,'')))
if(@in_str='')
begin
insert into @strs(c_str)
select ''
-- Description: 把字符串分割到一个表中
================
CREATE FUNCTION [dbo].[uf_split_string]
(
@in_str varchar(MAX),
@split varchar(1)
)
RETURNS
@strs TABLE
(
c_str varchar(100)
)
AS
BEGIN
select @in_str=ltrim(rtrim(isnull(@in_str,'')))
if(@in_str='')
begin
insert into @strs(c_str)
select ''