Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.ComplianceValid ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Original SQL ===== <code sql> create function "pears"."ComplianceValid"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ in "pPersonID" char(20),in "pComplianceDomainID" char(20),in "AtDate" date,in "pClientCode" char(12) default null ) 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","pComplianceDomainID","AtDate","pClientCode") 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 "warnMsg" is not null then set "warnMsg" = "string"('Warning: ',"warnMsg") end if; if "errMsg" is not null then return "string"('P',"pPersonID",'>>COMPLIANCE',"char"(9),"errMsg","warnMsg") else if "warnMsg" is not null then return "string"('^P',"pPersonID",'>>COMPLIANCE',"char"(9),"warnMsg") end if end if end </code> database/functions/pears_compliancevalid.txt Last modified: 2026/08/07 19:24by 127.0.0.1