pears.TempVacancyShiftMatchOrder

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

Original SQL

CREATE FUNCTION "pears"."TempVacancyShiftMatchOrder"( IN "pScore" DOUBLE,IN "pCustom" DOUBLE,IN "pHighlight" SMALLINT,IN "Persid" CHAR(20),IN "Vacid" CHAR(20) ) 
RETURNS DOUBLE
BEGIN
  -- Will sort in DESCENDING order of the value returned.
  -- pScore (the default) is the number of the shifts they can do with explicit availability being weighted higher.
  -- pCustom is the custom column value.
  -- pHighlight is the previous usage flag - 2 for same vacancy, 1 for same company, 0 for neither.
  DECLARE "rv" DOUBLE;
  SET "rv" = "pScore";
  RETURN "rv"
END