====== pears.NetAgencyVacancyNotesUpdate ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Original SQL =====
create procedure "pears"."NetAgencyVacancyNotesUpdate"( in "pWebUserID" char(20),in "pLineID" char(21),in "pNote" long varchar )
result( "pResult" char(255) )
begin
declare "LineType" char(1);
declare "LineID" char(20);
set "LineType" = "left"("pLineID",1);
set "LineID" = "right"("pLineID",20);
if "length"("pNote") > 50 then
select '99:~the Note is too long. It has been limited to 50 characters';
return
end if;
case "LineType"
when 'V' then
update "vacancy" set "othernotes" = "pNote" where "vacancyid" = "LineID"
when 'P' then
update "tempshiftplan" set "clientnote" = "pNote" where "tempshiftplanid" = "LineID"
end case;
select '0:~success'
end
go
COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetAgencyVacancyNotesUpdate" IS
{create PROCEDURE pears."NetAgencyVacancyNotesUpdate"(in pWebUserID char(20), in pLineID char(21), in pNote long varchar)
RESULT(pResult char(255))
BEGIN
declare LineType char(1);
declare LineID char(20);
set LineType=left(pLineID,1);
set LineID = right(pLineID,20);
if length(pNote) > 50 then
select '99:~the Note is too long. It has been limited to 50 characters';
return;
end if;
case LineType
when 'V' then
update vacancy set othernotes=pNote where vacancyid=LineID;
when 'P' then
update tempshiftplan set clientnote=pNote where tempshiftplanid=LineID;
end case;
select '0:~success';
END
}