hi,
pls use this altered function , which will give you the desired result.
alter function fn_split_btw_patterns(@inputstring varchar(max),@firstpattern varchar(max),@secondpattern varchar(max))
returns varchar(max)
as
begin
declare @returnstring varchar(max)=''
declare @start int
declare @end int
select @start = patindex('%' +...