Database SQL Operation: ContactLogLink.countActiveByLinkIDLinkTypeNotContactLogIDConcernConcernRoleID
Description: | Method to count active Contact Log Link records for specified Link id, Link Type and Concern Concern Role id which exist for other that specified Contact Log id. |
Sterotype: | ns |
SELECT
COUNT(*)
INTO
:count
FROM
ContactLog,
ContactLogLink,
ContactLogConcern
WHERE ContactLogLink.linkID = :linkID
AND ContactLogLink.linkType = :linkType
AND ContactLogLink.contactLogID <> :contactLogID
AND ContactLogLink.recordStatus = :recordStatus
AND ContactLogLink.contactLogID = ContactLog.contactLogID
AND ContactLog.recordStatus = :recordStatus
AND ContactLogLink.contactLogID = ContactLogConcern.contactLogID
AND ContactLogConcern.concernRoleID = :concernRoleID
AND ContactLogConcern.recordStatus = :recordStatus
|