database:functions:pears_getquestdate



pears.GetQuestDate

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

CREATE FUNCTION "pears"."GetQuestDate"( 
  /* Application Maintained Function / Procedure - DO NOT EDIT*/
  IN "stagloc" CHAR(3),IN "stagid" CHAR(3),IN "sparentid" CHAR(20) ) 
RETURNS DATE
BEGIN
  DECLARE "rv" DATE;
  DECLARE "tagval" DOUBLE;
  SET "rv" = NULL;
  SELECT "max"("value") INTO "tagval" FROM "tagvalue" WHERE "taglocation" = "stagloc" AND "id" = "sparentid" AND "tagid" = "stagid";
  IF "isnull"("tagval",0) <> 0 THEN
    SET "rv" = "dateadd"("day","tagval","date"('1899-12-30'))
  END IF;
  RETURN("rv")
END
  • database/functions/pears_getquestdate.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1