ZL_StripeHtmlTag
GO
CREATE FUNCTION [dbo].[ZL_StripeHtmlTag](@cont varchar(max))
returns varchar(max)
as
begin
declare @tem varchar(max),@i int,@j int;
set @tem = replace(ISNULL(@cont,''),' ','');
set @i = charindex('<',@tem,0);
set @j = charindex('>',@tem,1);
while @i < @j
begin
select @tem = replace(@tem,SUBSTRING(@tem,@i,@j-@i+1),'')
set @i = charindex('<',@tem,0);
set @j = charindex('>',@tem,1);
end
return @tem
end
detele from ZL_StripeHtmlTag
drop table ZL_StripeHtmlTag
TRUNCATE table ZL_StripeHtmlTag