====== pears.DescriptionForTimesheetLine ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create function "pears"."DescriptionForTimesheetLine"( in "tslineid" char(20) )
returns long varchar
begin
declare "rv" long varchar;
set "rv" = null;
select "string"('W/e ',"dateformat"("weekmonthenddate"("temptimesheet"."period","temptimesheet"."periodlength"),'dd/mm/yy'),' ',"person"."name",' ',"temppayband"."description",' ',"isnull"("temptimesheetline"."description","temppayband"."unit"))
into "rv"
from "temptimesheetline" key join("temppayband",("temptimesheet" key join "person"))
where "temptimesheetline"."temptimesheetlineid" = "tslineid";
return("rv")
end