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.ComplianceValidforTempShift ====== <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> COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."ComplianceValidforTempShift" IS {create function ComplianceValidforTempShift /* Application Maintained Function / Procedure - DO NOT EDIT*/ ( in "pPersonID" char(20),in "pTempShiftPlanID" char(20) ) returns long varchar begin declare "pComplianceDomainID" char(20); declare pClientCode char(12); declare "pDate" date; declare "pDeptID" char(2); select "t"."ComplianceDomainID","p"."ShiftDate",c.TempComplianceCode into "pComplianceDomainID","pDate",pClientCode from "TempShiftPlan" as "p" key join "TempShiftTemplate" as "t", "TempShiftPlan" as "p" key join vacancy key join employment key join company c where "p"."tempshiftplanid" = "pTempShiftPlanID"; if "pComplianceDomainID" is null then select "v"."ComplianceDomainID","v"."DepartmentID" into "pComplianceDomainID","pDeptID" from "TempShiftPlan" as "p" key join "vacancy" as "v" where "p"."tempshiftplanid" = "pTempShiftPlanID" end if; if "pComplianceDomainID" is null then select first "ComplianceDomainID" into "pComplianceDomainID" from "ComplianceDomain" where "DepartmentID" = "pDeptID" and "Name" like 'Default%' and (ClientTempComplianceCode is null or ClientTempComplianceCode=pClientCode) order by ClientTempComplianceCode desc, "Name" asc end if; if "pComplianceDomainID" is not null then return "ComplianceValid"("pPersonID","pComplianceDomainID","pDate",pClientCode) end if end } </code> database/procedures/pears_compliancevalidfortempshift.txt Last modified: 2026/08/07 19:24by 127.0.0.1