====== pears.NetSetShiftplanCascade ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create procedure "pears"."NetSetShiftplanCascade"( in "splanid" char(20) ) begin declare "dtCascade" "datetime"; select "GetCascadeTime"("employment"."companyid","vacancy"."vacancyid",current timestamp,"p"."shiftdate"+"p"."timefrom",current timestamp,1) into "dtCascade" from "tempshiftplan" as "p" key join "vacancy" key join "employment" where "p"."tempshiftplanid" = "splanid"; if "dtCascade" is not null then update "tempshiftplan" set "cascadedatetime" = "dtCascade" where "tempshiftplanid" = "splanid" end if end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetSetShiftplanCascade" IS {create PROCEDURE pears."NetSetShiftplanCascade"( in "splanid" char(20) ) begin declare "dtCascade" "datetime"; select "GetCascadeTime"("employment"."companyid","vacancy"."vacancyid",current timestamp,"p"."shiftdate"+"p"."timefrom",current timestamp,1) into "dtCascade" from "tempshiftplan" as "p" key join "vacancy" key join "employment" where "p"."tempshiftplanid" = "splanid"; if "dtCascade" is not null then update "tempshiftplan" set "cascadedatetime" = "dtCascade" where "tempshiftplanid" = "splanid" end if end }