====== pears.GetQuestAnswerLong ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create function "pears"."GetQuestAnswerLong"(
/* Application Maintained Function / Procedure - DO NOT EDIT*/
in "tagloc" char(3),in "tagid" char(3),in "parentid" char(20) )
returns long varchar
begin
declare "rv" long varchar;
declare "i" integer;
set "rv" = "getquesttextLong"("tagloc","tagid","parentid");
if "rv" is null then
return(null)
end if;
set "i" = "locate"("rv","char"(13));
if "i" > 0 then
set "rv" = "left"("rv","i"-1)
end if;
set "i" = "locate"("rv","char"(9));
if "i" >= "length"("rv") then
return('')
end if;
if "i" > 0 then
set "rv" = "stuff"("rv",1,"i",'')
end if;
return("rv")
end