pears.NetVacancyHasRateScript
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"."NetVacancyHasRateScript" IS {CREATE FUNCTION pears.NetVacancyHasRateScript(IN jtypeid CHAR(20),IN vacid CHAR(20)) RETURNS INTEGER BEGIN IF jtypeid IS NOT NULL THEN IF EXISTS(SELECT * FROM tempjobtype WHERE tempjobtypeid = jtypeid AND tempratescriptid IS NOT NULL) THEN RETURN 1 ELSE RETURN 0 END IF ELSE IF EXISTS(SELECT * FROM vacancy AS v KEY JOIN tempjobtype AS t WHERE v.vacancyid = vacid AND t.tempratescriptid IS NOT NULL) THEN RETURN 1 ELSE RETURN 0 END IF END IF END }