pears.AutoMatchShiftMatchOrder

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

CREATE FUNCTION "pears"."AutoMatchShiftMatchOrder"( 
  IN @PersonID CHAR(20),IN @TempShiftPlanID CHAR(20),IN @Score DOUBLE,IN @Custom DOUBLE,IN @OldOrNew CHAR(3) ) 
RETURNS DOUBLE
BEGIN
  -- Will sort in DESCENDING order of the value returned.
  -- @Score (from MatchShifts)  explicit availability being weighted higher.
  -- return 0 to exclude from  notification
  DECLARE "rv" DOUBLE;
  IF @OldOrNew = 'Old' THEN
    -- select ... from AutoMatchOldTempWeightingConfig 
    -- do the calcs 
  ELSE
    -- select ... from AutoMatchNewTempWeightingConfig 
  END IF;
  SET "rv" = 1000*@Score;
  RETURN "rv"
END
  • database/functions/pears_automatchshiftmatchorder.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1