Database SQL Operation: VerificationAttachmentStatus.countByRelatedIDTypeAndReviewStatus
Description: | Counts the number of records on the AttachmentLink table for the specified related ID, related type and record status, where a corresponding record on the VerificationAttachmentStatus table exists, for the specified review status. |
Sterotype: | ns |
SELECT count(*)
INTO :numberOfRecords
FROM AttachmentLink al
INNER JOIN VerificationAttachmentStatus vas
ON al.attachmentLinkID = vas.attachmentLinkID
WHERE al.relatedObjectID = :relatedObjectID
AND al.relatedObjectType = :relatedObjectType
AND al.recordStatus = :recordStatus
AND vas.reviewStatus = :reviewStatus
|