====== pears.NetCandidateShifts ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Original SQL ===== create procedure "pears"."NetCandidateShifts"( in "pWebUserID" char(20),in "pPersonID" char(20) ) result( "TempShiftPlanID" char(20),"ShiftDate" date,"TimeFrom" time,"TimeTo" char(20),"Description" char(250),"Location" char(100) ) begin set "pPersonID" = "NetCandidateValidPersonID"("pWebUserID","pPersonID"); select "p"."tempshiftplanid","p"."shiftdate","p"."timefrom","p"."timeto","string"("vacancy"."position",' - ',"p"."description"),"isnull"("vacancy"."town","company"."town") from "IQXNetCandidateShifts" as "x" key join "tempshiftplan" as "p" key join "vacancy" key join "employment" key join "company" where "x"."personid" = "pPersonID" order by "shiftdate" asc,"timefrom" asc end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetCandidateShifts" IS {create PROCEDURE pears."NetCandidateShifts"(in pWebUserID char(20), pPersonID char(20) ) RESULT(TempShiftPlanID char(20), ShiftDate date, TimeFrom time, TimeTo char(20), Description char(250), Location char(100) ) BEGIN set pPersonID=NetCandidateValidPersonID(pWebUserID, pPersonID); select p.tempshiftplanid, p.shiftdate, p.timefrom, p.timeto, string(vacancy.position, ' - ', p.description), isnull(vacancy.town,company.town) from IQXNetCandidateShifts x key join tempshiftplan p key join vacancy key join employment key join company where x.personid=pPersonID order by shiftdate,timefrom; END }