Database SQL Operation: PlanItem.countPlanTemplatePlanItemsByPlanItemAndStatus
Description: | Counts plan template planItems created for the planItem. |
Sterotype: | ns |
SELECT
COUNT(*)
INTO
:numPlanItems
FROM
PlanTemplatePlanItem,
PlanTemplateSubGoal,
PlanTemplate
WHERE PlanTemplatePlanItem.planItemID = :planItemID
AND PlanTemplatePlanItem.planTemplateSubGoalID = PlanTemplateSubGoal.planTemplateSubGoalID
AND PlanTemplateSubGoal.planTemplateID = PlanTemplate.planTemplateID
AND PlanTemplate.recordStatus = :recordStatus
|