Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.NetVacancyRoleAllowed ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Original SQL ===== <code sql> COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetVacancyRoleAllowed" IS {create FUNCTION pears.NetVacancyRoleAllowed(in pWebUserID char(20), in pVacancyID char(20), in pVacancyRoleExternalCode char(20)) returns smallint begin if not exists (select * from VacancyRoleAllocation a key join VacancyRole r where a.VacancyID=pVacancyID and r.ExternalCode=pVacancyRoleExternalCode) then return 1 -- Nobody assigned to this role - anyone can do end if; if exists (select * from VacancyRoleAllocation a key join VacancyRole r, VacancyRoleAllocation a key join employment key join iqxnetuserlink x where a.VacancyID=pVacancyID and r.ExternalCode=pVacancyRoleExternalCode and x.IQXNetUserID=pWebUserID) then return 1 end if; return 0; end } </code> database/procedures/pears_netvacancyroleallowed.txt Last modified: 2026/08/07 19:24by 127.0.0.1