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