Operation Details
Description: Counts plan templates created for the goal specified that have assigned plan template sub goals based on the given sub goal.
Sterotype: ns
SQL
SELECT
  COUNT (*)
INTO
  :count 
FROM
  PlanTemplate,
  PlanTemplateSubGoal 
WHERE PlanTemplateSubGoal.subGoalID = :subGoalID 
  AND PlanTemplateSubGoal.planTemplateID = PlanTemplate.planTemplateID 
  AND PlanTemplate.goalID = :goalID 
  AND PlanTemplate.recordStatus = :recordStatus