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.NetIncomingApplications ====== <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> create procedure "pears"."NetIncomingApplications"( in "pWebUserId" char(20),in "Jobid" char(20) default null ) result( "pResult" char(250) ) begin declare "Person" char(20); declare "Applied" char(20); declare "VacancyOwner" char(20); if "pWebUserId" is null then select '99:~You are not logged in'; return end if; set "VacancyOwner" = (select "staffid" from "vacancy" where "vacancyid" = "JobId"); set "Person" = (select "IQXNetUserLink"."PersonID" from "IQXNetUserLink" where "iqxnetuserlink"."iqxnetuserid" = "pwebuserid"); set "Applied" = (select "status" from "progress" where "vacancyid" = "JobId" and "personid" = "person"); if "Applied" > '' then select '99:~You have already Applied for this post'; return end if; insert into "progress"( "progressid","vacancyid","actiondate","status","personid","staffId" ) values( "uniquekey"('X'),"JobId","getdate"(),'A',"Person","VacancyOwner" ) ; select '0:~Success' end /* Unsafe - do not use without re-write */ go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetIncomingApplications" IS {create PROCEDURE pears."NetIncomingApplications"( in "pWebUserId" char(20),in "Jobid" char(20) default null ) result( "pResult" char(250) ) begin declare "Person" char(20); declare "Applied" char(20); declare "VacancyOwner" char(20); if "pWebUserId" is null then select '99:~You are not logged in'; return end if; set "VacancyOwner" = (select "staffid" from "vacancy" where "vacancyid" = "JobId"); set "Person" = (select "IQXNetUserLink"."PersonID" from "IQXNetUserLink" where "iqxnetuserlink"."iqxnetuserid" = "pwebuserid"); set "Applied" = (select "status" from "progress" where "vacancyid" = "JobId" and "personid" = "person"); if "Applied" > '' then select '99:~You have already Applied for this post'; return end if; insert into "progress"( "progressid","vacancyid","actiondate","status","personid","staffId" ) values( "uniquekey"('X'),"JobId","getdate"(),'A',"Person","VacancyOwner" ) ; select '0:~Success' end /* Unsafe - do not use without re-write */ } </code> database/procedures/pears_netincomingapplications.txt Last modified: 2026/08/07 19:24by 127.0.0.1