====== pears.NetAgencyVacancyNotes ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create procedure "pears"."NetAgencyVacancyNotes"( in "pWebUserID" char(20),in "pLineID" char(21) ) result( "pNotes" long varchar ) begin declare "LineType" char(1); declare "LineID" char(20); set "LineType" = "left"("pLineID",1); set "LineID" = "right"("pLineID",20); case "LineType" when 'V' then select top 1 "othernotes" from "vacancy" where "vacancyid" = "LineID" when 'P' then select top 1 "clientnote" from "tempshiftplan" where "tempshiftplanid" = "LineID" end case end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetAgencyVacancyNotes" IS {create PROCEDURE pears."NetAgencyVacancyNotes"(in pWebUserID char(20), in pLineID char(21)) RESULT(pNotes long varchar) BEGIN declare LineType char(1); declare LineID char(20); set LineType=left(pLineID,1); set LineID = right(pLineID,20); case LineType when 'V' then select top 1 othernotes from vacancy where vacancyid=LineID; when 'P' then select top 1 clientnote from tempshiftplan where tempshiftplanid=LineID end case; END }