Database SQL Operation: EvidenceDescriptor.countCasesByEvidenceTypeStatusesAndConcernRoleType
Description: | Checks if an evidence type is being used on a live case for specific concern role type. |
Sterotype: | ns |
SELECT
count(CaseHeader.caseID)
INTO
:value
FROM
EvidenceDescriptor,
CaseHeader,
ConcernRole
WHERE
EvidenceDescriptor.evidenceType = :evidenceType
AND
(
EvidenceDescriptor.statusCode = :statusCode1
OR EvidenceDescriptor.statusCode = :statusCode2
)
AND CaseHeader.caseID = EvidenceDescriptor.caseID
AND CaseHeader.concernRoleID = ConcernRole.concernRoleID
AND ConcernRole.concernRoleType = :concernRoleType
|