pears.AutoMatchShiftMatchOrder
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Original SQL
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."AutoMatchShiftMatchOrder" IS {CREATE FUNCTION 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 }