====== 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
*/
}