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.PersonHeadline ====== <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"."PersonHeadline"( in "RecordID" char(20) ) returns long varchar begin declare "RV" long varchar; declare "RS" long varchar; declare "Part" long varchar; declare "Shift" long varchar; declare "NewLine" char(2); declare "FRG" decimal(10,1); set "rv" = ''; set "rs" = ''; set "Part" = ''; set "Shift" = ''; select first "company"."name" into "Part" from "employment" key join("placement","company") where "employment"."personid" = "recordid" and "employment"."startdate" <= current date and "isnull"("employment"."leavedate",current date) >= current date order by "employment"."startdate" desc; select first "company"."name" into "Shift" from "TempShift" key left outer join("vacancy" key join "employment" key join "company") where "tempshift"."personid" = "recordid" and "TempShift"."ShiftDate" = current date; if "isnull"("Shift",'') <> '' then set "RV" = "RV"+'Shift today at: '+"Shift" else if "isnull"("Part",'') <> '' then set "RV" = "RV"+' Currently Placed at: '+"Part" end if end if; return "rv" end </code> database/functions/pears_personheadline.txt Last modified: 2026/08/07 19:24by 127.0.0.1