Database SQL Operation: InvCAssessmentConfig.countOverlapingICAssessConfigs
Description: | Counts the number of records that overlap the specified record. |
Sterotype: | ns |
SELECT
COUNT(*)
INTO
:recordCount
FROM
InvCAssessmentConfig
WHERE investigationConfigID = :investigationConfigID
AND assessmentConfigurationID = :assessmentConfigurationID
AND recordStatus = :recordStatus
AND
(
invCAssessmentConfigID <> :invCAssessmentConfigID
OR :invCAssessmentConfigIDIsNull <> '0'
)
AND
(
(
endDate >= :startDate
OR endDate IS NULL
)
AND
(
startDate <= :endDate
OR :endDate IS NULL
)
)
|