CREATE procedure
clx.proc_strip_markup(inout @adtext varchar(32000))
begin
--% Declare all variable required used in stored procedures
declare @li_asc integer;
declare @ls_output varchar(32000);
declare @ls_char varchar(255);
declare @ls_body varchar(32000);
declare @ls_setspace char(1);
declare @ls_lastspace char(1);
declare @li_tagon integer;
--% Initialiase variables
set @ls_output='';
set @li_tagon=0;
set @ls_setspace='N';
set @ls_lastspace='N';
--% set @ls_body = 'pronto [mb1] for//m/ja/dt *1* 1/4more @ web/@mymail.com {...}Start {.} [pc7f4fb]words {...}End {.}1{11} ';
set @ls_body=@adtext;
--% Start the loop
while length(@ls_body) > 0 loop
if ASCII(@ls_char) = 255 then
set @ls_body=SUBSTR(@ls_body,2)
end if;
set @ls_setspace='N';
case "Left"(@ls_body,1) when '*' then
--% Format
if @li_tagon = 1 then
set @li_tagon=0
else
set @li_tagon=1
end if;
clx.proc_strip_markup(inout @adtext varchar(32000))
begin
--% Declare all variable required used in stored procedures
declare @li_asc integer;
declare @ls_output varchar(32000);
declare @ls_char varchar(255);
declare @ls_body varchar(32000);
declare @ls_setspace char(1);
declare @ls_lastspace char(1);
declare @li_tagon integer;
--% Initialiase variables
set @ls_output='';
set @li_tagon=0;
set @ls_setspace='N';
set @ls_lastspace='N';
--% set @ls_body = 'pronto [mb1] for//m/ja/dt *1* 1/4more @ web/@mymail.com {...}Start {.} [pc7f4fb]words {...}End {.}1{11} ';
set @ls_body=@adtext;
--% Start the loop
while length(@ls_body) > 0 loop
if ASCII(@ls_char) = 255 then
set @ls_body=SUBSTR(@ls_body,2)
end if;
set @ls_setspace='N';
case "Left"(@ls_body,1) when '*' then
--% Format
if @li_tagon = 1 then
set @li_tagon=0
else
set @li_tagon=1
end if;