pears.TempaidTempEmaill

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

CREATE FUNCTION "pears"."TempaidTempEmaill"( IN "pid" CHAR(20) ) 
RETURNS VARCHAR(100)
BEGIN
  DECLARE "rv" VARCHAR(100);
  SELECT "isnull"("person"."payrollemailaddress",(SELECT FIRST "phone"."number" FROM "phone" KEY JOIN "phonetype"
      WHERE "phone"."who" = 'P' AND "phone"."whoid" = "pid" AND "phonetype"."name" LIKE '%E%mail%'),'')
    INTO "rv"
    FROM "person" WHERE "personid" = "pid";
  RETURN("rv")
END
  • database/functions/pears_tempaidtempemaill.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1