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.MasterRosterTempAllowed ====== <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"."MasterRosterTempAllowed"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "ppersid" char(20),in "pmastershiftid" char(20) ) returns integer begin declare "ionly" integer; declare "iactive" integer; if "pmastershiftid" is null then return 1 end if; if "ppersid" = (select "defaultpersonid" from "masterrostershift" where "masterrostershiftid" = "pmastershiftid") then return 1 end if; select "isnull"("r"."useonlypreferred",0),"isnull"("p"."active",0) into "ionly","iactive" from "masterrostershift" as "s" key join "masterroster" as "r" left outer join "MasterRosterPreferredPerson" as "p" on "r"."MasterRosterID" = "p"."MasterRosterID" and "p"."PersonID" = "ppersid" where "s"."masterrostershiftid" = "pmastershiftid"; if "ionly" = 0 then return 1 else return "iactive" end if end </code> database/functions/pears_masterrostertempallowed.txt Last modified: 2026/08/07 19:24by 127.0.0.1