Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.tempslotstartdate ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Original SQL ===== <code sql> create function "pears"."tempslotstartdate"( in "tsid" char(20) ) returns date begin declare "rv" date; select "employment"."startdate" into "rv" from "tempslot" key join "placement" key join "employment" where "tempslot"."tempslotid" = "tsid"; if "rv" is null then select "weekenddate"("tempslot"."yearnumber","tempslot"."weeknumber") into "rv" from "tempslot" where "tempslotid" = "tsid" end if; if "rv" is null then set "rv" = current date end if; return("rv") end </code> database/functions/pears_tempslotstartdate.txt Last modified: 2026/08/07 19:24by 127.0.0.1