pears.ComplianceValidPerson

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

COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."ComplianceValidPerson" IS 
{CREATE FUNCTION ComplianceValidPerson 
 
/* Application Maintained Function / Procedure - DO NOT EDIT*/
 
( IN pPersonID CHAR(20), IN pIncludeWarnings INTEGER ) 
RETURNS long VARCHAR
BEGIN
  DECLARE errMsg long VARCHAR;
  DECLARE warnMsg long VARCHAR;
  FOR PFOR AS PCUR no scroll cursor FOR
    SELECT Description,STATUS,Info
      FROM ComplianceTable(pPersonID) FOR READ ONLY do
    CASE STATUS
    WHEN 1 THEN SET errMsg = string(errMsg,Description,' ',Info,'. ')
    WHEN 2 THEN SET warnMsg = string(warnMsg,Description,' ',Info,'. ')
    END CASE
  END FOR;
  IF pIncludeWarnings = 0 THEN
    SET warnMsg = NULL
  END IF;
  IF warnMsg IS NOT NULL THEN
    SET warnMsg = string('Warning: ',warnMsg)
  END IF;
  RETURN NULLIF(string(errMsg,warnMsg),'');
END
}
  • database/procedures/pears_compliancevalidperson.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1