Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
CREATE FUNCTION "pears"."MasterRosterMakeDate"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ IN "pstartdate" DATE,IN "pdays" INTEGER,IN "pgedate" DATE ) RETURNS DATE deterministic BEGIN IF "pstartdate" IS NULL OR "pdays" IS NULL OR "pgedate" IS NULL THEN RETURN NULL END IF; SET "pdays" = "abs"("pdays"); loop IF "pstartdate" >= "pgedate" THEN RETURN "pstartdate" END IF; SET "pstartdate" = "dateadd"("day","pdays","pstartdate") END loop END