SQL 中自己创建函数,分割字符串(4) select @findepnumok = 1 --找到epnum后置为1 BREAK end ELSE begin select @temp_i = @temp_i + 1 select @findepnumok = 0 --找不到epnum后置为1 end END
if @findepnumok = 0 begin SELECT @str_return = '00000000' end end return @str_return end
GOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GO
SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GO
-- getstrcount 输入一个没有分割的字符串,以及分割符