====== pears.SelfbillNominalForTimesheetLine ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create function "pears"."SelfbillNominalForTimesheetLine"( in "tslineid" char(20),in "suppliercode" char(12) ) returns char(20) begin declare "rv" char(20); set "rv" = null; select "staff"."analysiscode" into "rv" from "temptimesheetline" key join "temptimesheet" key join "placement" key join "staff" where "temptimesheetline"."temptimesheetlineid" = "tslineid"; return "isnull"("rv",'4000') end