pears.NetClientRequirementDocuments
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Original SQL
CREATE PROCEDURE "pears"."NetClientRequirementDocuments"( IN "pWebUserID" CHAR(20),IN "pVacancyID" CHAR(20) ) RESULT( "DocType" CHAR(50),"DocDescription" CHAR(50),"LastUpdate" TIMESTAMP,"DocumentID" CHAR(20) ) // IQXWeb BEGIN SELECT "documenttype"."description" AS "DocType", "oledocument"."description" AS "DocDescription", "isnull"("blobstore"."changedat","blobstore"."createdat") AS "LastUpdate", "oledocument"."oledocumentid" AS "DocumentID" FROM "oledocument" JOIN "blobstore" ON "blobstore"."id" = "oledocument"."oledocumentid" AND "blobstore"."class" = 'O' ,"oledocument" KEY LEFT OUTER JOIN "documenttype" WHERE "ownertype" = 'V' AND "ownerid" = "pVacancyID" AND "blobstore"."PublishToWeb" = 1 ORDER BY "createdat" DESC END /* DOC 04-12-2019 GJ Created */ GO COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."NetClientRequirementDocuments" IS {CREATE PROCEDURE pears."NetClientRequirementDocuments"(IN pWebUserID CHAR(20),IN pVacancyID CHAR(20)) RESULT(DocType CHAR(50),DocDescription CHAR(50),LastUpdate TIMESTAMP,DocumentID CHAR(20)) // IQXWeb BEGIN SELECT documenttype.description AS DocType, oledocument.description AS DocDescription, isnull(blobstore.changedat, blobstore.createdat) AS LastUpdate, oledocument.oledocumentid AS DocumentID FROM oledocument JOIN blobstore ON blobstore.id = oledocument.oledocumentid AND blobstore.class = 'O', oledocument KEY LEFT OUTER JOIN documenttype WHERE ownertype = 'V' AND ownerid = pVacancyID AND blobstore.PublishToWeb = 1 ORDER BY createdat DESC END /* DOC 04-12-2019 GJ Created */ }