database:functions:pears_personkeywordsquestion



pears.PersonKeyWordsQuestion

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

CREATE FUNCTION "pears"."PersonKeyWordsQuestion"( 
  /* Application Maintained Function / Procedure - DO NOT EDIT*/
  IN @PersonID CHAR(20) ) 
RETURNS long VARCHAR
BEGIN
  DECLARE "rv" long VARCHAR;
  SELECT
    "nullif"(
    "trim"(
    (SELECT "list"("GetQuestAnswer"("t"."TagLocation","t"."TagID",@PersonID),' ')
      FROM "Tag" AS "t" JOIN "Search" AS "s" ON("t"."TagLocation" = 'P' OR "t"."TagLocation" = "string"('A',"s"."DepartmentID"))
      WHERE "t"."taglocation" LIKE 'A%'
      AND "t"."IncludeInKeyWordSearch" = 1
      AND "t"."TagType" IN( 'T','U','L','M' ) 
      AND "s"."Personid" = @PersonID)
     || ' '
     || (SELECT "list"("GetQuestAnswer"("t"."TagLocation","t"."TagID",@PersonID),' ')
      FROM "Tag" AS "t"
      WHERE "t"."taglocation" = 'P'
      AND "t"."IncludeInKeyWordSearch" = 1
      AND "t"."TagType" IN( 'T','U','L','M' ) )),
    '') INTO "rv";
  RETURN "rv"
END
  • database/functions/pears_personkeywordsquestion.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1