pears.NetVacancyDocuments

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

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
}
  • database/procedures/pears_netvacancydocuments.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1