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.NetVacancyDocuments ====== <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"."NetVacancyDocuments"( in "pWebUserID" char(20),in "pVacID" char(20) default null ) result( "DocType" char(50),"DocDescription" char(50),"LastUpdate" timestamp,"SpecialType" char(50),"DocumentID" char(20),"OwnerID" char(20),"SortOrder" integer ) -- 20120814 download placement documents for current opportunities begin declare "userClass" char(20); declare "isCandorAgency" smallint; if "iqxnethaspermission"("pwebuserid",'DOCVACDOWNLOAD') = 0 then set "pVacID" = null else select "isnull"("nullif"("upper"("oledocument"."fileextension"),''),'MS Office') as "DocType", "oledocument"."description" as "DocDescription", "isnull"("blobstore"."changedat","blobstore"."createdat") as "LastUpdate",'' as "SpecialType", "oledocument"."oledocumentid" as "DocumentID", "oledocument"."ownerid" as "OwnerID",'1' as "SortOrder" from "oledocument" join "blobstore" on "blobstore"."id" = "oledocument"."oledocumentid" and "blobstore"."class" = 'O',"oledocument" where "oledocument"."ownertype" = 'V' and "oledocument"."ownerid" = "pVacID" and("oledocument"."rawfile" = 1 or "blobstore"."zipped" = 2) and "blobstore"."publishtoweb" = 1 order by "LastUpdate" asc end if end go COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetVacancyDocuments" IS {create procedure pears."NetVacancyDocuments"( in "pWebUserID" char(20),in "pVacID" char(20) default null ) result( "DocType" char(50),"DocDescription" char(50),"LastUpdate" timestamp,"SpecialType" char(50),"DocumentID" char(20),"OwnerID" char(20),"SortOrder" integer ) -- 20120814 download placement documents for current opportunities begin declare "userClass" char(20); declare "isCandorAgency" smallint; if "iqxnethaspermission"("pwebuserid",'DOCVACDOWNLOAD') = 0 then set "pVacID" = null else select "isnull"("nullif"("upper"("oledocument"."fileextension"),''),'MS Office') as "DocType", "oledocument"."description" as "DocDescription", "isnull"("blobstore"."changedat","blobstore"."createdat") as "LastUpdate",'' as "SpecialType", "oledocument"."oledocumentid" as "DocumentID", "oledocument"."ownerid" as "OwnerID",'1' as "SortOrder" from "oledocument" join "blobstore" on "blobstore"."id" = "oledocument"."oledocumentid" and "blobstore"."class" = 'O',"oledocument" where "oledocument"."ownertype" = 'V' and "oledocument"."ownerid" = "pVacID" and("oledocument"."rawfile" = 1 or "blobstore"."zipped" = 2) and "blobstore"."publishtoweb" = 1 order by "LastUpdate" asc end if end } </code> database/procedures/pears_netvacancydocuments.txt Last modified: 2026/08/07 19:24by 127.0.0.1