Operation Details
Description: <p> @Deprecated </p> <p> Searches&nbsp;planned&nbsp;sub&nbsp;goals&nbsp;for&nbsp;s&nbsp;service&nbsp;plan&nbsp;statement.&nbsp;Result&nbsp;sorted&nbsp;by&nbsp;plannedSubGoalID&nbsp;and&nbsp;plannedItemID. </p>
Sterotype: nsmulti
SQL
SELECT
  PlannedSubGoal.plannedSubGoalID,
  SubGoal.name,
  PlannedSubGoal.status,
  PlannedSubGoal.sensitivityCode,
  PlannedItem.plannedItemID,
  PlannedItem.name,
  PlannedItem.status,
  PlannedItem.sensitivityCode,
  PlannedItem.estimatedCost,
  PlannedItem.actualCost
INTO
  :plannedSubGoalID,
  :subGoalName,
  :plannedSubGoalStatus,
  :plannedSubGoalSensitivity,
  :plannedItemID,
  :plannedItemName,
  :plannedItemStatus,
  :plannedItemSensitivity,
  :plannedItemEstimatedCost,
  :plannedItemActualCost 
FROM
  PlannedGoal,
  PlannedSubGoal 
  
  LEFT OUTER JOIN
  
  PlannedItem 
  ON PlannedSubGoal.plannedSubGoalID = PlannedItem.plannedSubGoalID,
  SubGoal 
WHERE 
  (
    PlannedGoal.caseID = :caseID 
  ) 
  AND 
  (
    PlannedGoal.plannedGoalID = PlannedSubGoal.plannedGoalID 
    AND PlannedSubGoal.plannedGroupID IS NULL 
  ) 
  AND 
  (
    SubGoal.subGoalID = PlannedSubGoal.subGoalID 
  ) 
ORDER BY plannedSubGoalID,
  plannedItemID