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