====== pears.PersonUnavailabilityTimesheet ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create function "pears"."PersonUnavailabilityTimesheet"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "pid" char(20),in "WorM" char(1),in "pPeriod" integer,in "dfrom" date,in "dto" date ) returns char(200) begin declare "ua" char(100); select "personunavailability"("pid",'T',"dfrom","dto") into "ua"; if "ua" = '' then if exists(select "tempprovtimesheetid" from "tempprovtimesheet" where "personid" = "pid" and "periodlength" = "worm" and "period" = "pperiod") then set "ua" = 'Provisional Timesheets Entered' end if end if; return("ua") end