Database SQL Operation: PlanTemplate.countBySubGoalAndPlanItem
Description: | Counts plan templates created for the plan item and sub goal. |
Sterotype: | ns |
SELECT
COUNT (*)
INTO
:count
FROM
PlanTemplatePlanItem,
PlanTemplateSubGoal,
PlanTemplate
WHERE PlanTemplatePlanItem.planItemID = :planItemID
AND PlanTemplatePlanItem.planTemplateSubGoalID = PlanTemplateSubGoal.planTemplateSubGoalID
AND PlanTemplateSubGoal.subGoalID = :subGoalID
AND PlanTemplateSubGoal.planTemplateID = PlanTemplate.planTemplateID
AND PlanTemplate.recordStatus = :recordStatus
|