pears.PersonAvailableForRecovery

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

CREATE FUNCTION "pears"."PersonAvailableForRecovery"( 
  /* Application Maintained Function / Procedure - DO NOT EDIT*/
  IN "sFoundDigit" CHAR(1),IN "sPersonid" CHAR(20),IN "dShiftDate" DATE,IN "tShiftFrom" TIME,IN "tShiftTo" TIME,IN "iRecovery" SMALLINT,IN "MovingShiftID" CHAR(20) ) 
RETURNS CHAR(1)
BEGIN
  DECLARE "x" CHAR(1);
  IF "isnull"("irecovery",0) = 0 OR "isnull"("sfounddigit",'A') <> 'A' THEN
    RETURN "sfounddigit"
  END IF;
  SET "x" = "personavailableforplaniterate"("spersonid","dshiftdate","tshiftfrom","addrecoveryhours"("tshiftfrom","tshiftto","irecovery"),0,"movingshiftid");
  IF "isnull"("x",'A') = 'A' THEN
    RETURN "sfounddigit"
  ELSE
    RETURN "x"
  END IF
END
  • database/functions/pears_personavailableforrecovery.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1