Database SQL Operation: CaseHeader.countByActiveOwnerAndNotEqualStatus
Description: | Count all the active case records by ownerID with case status not equal to the passed status |
Sterotype: | ns |
SELECT
COUNT(*)
INTO
:value
FROM
CaseHeader,
CaseUserRole,
OrgObjectLink
WHERE OrgObjectLink.userName = :userName
AND OrgObjectLink.orgObjectLinkID = CaseUserRole.orgObjectLinkID
AND CaseUserRole.caseID = CaseHeader.caseID
AND CaseUserRole.typeCode = :typeCode
AND CaseUserRole.recordStatus = :recordStatus
AND
(
CaseHeader.statusCode <> :statusCode
)
|