Operation Details
Description:  
Sterotype: ns
SQL
SELECT
  PlannedItem.concerningID,
  ConcernRole.concernRoleName,
  ConcernRole.concernRoleType,
  PlannedItem.name,
  PlannedItem.sensitivityCode,
  PlannedItem.expectedStartDate,
  PlannedItem.expectedEndDate,
  PlannedItem.actualStartDate,
  PlannedItem.actualEndDate,
  PlannedItem.expectedOutcomeID,
  Outcome.name,
  PlannedItem.outcomeAchieved,
  PlannedItem.unitsDelivered,
  PlannedItem.authorizedUnits,
  PlannedItem.estimatedCost,
  PlannedItem.actualCost,
  PlannedItem.status,
  PlannedGoal.caseID,
  PlanItem.unitType,
  OrgObjectLink.orgObjectReference,
  OrgObjectLink.orgObjectType,
  OrgObjectLink.userName,
  Users.fullName

  INTO
    :concerningID,
    :concernRoleName,
    :concernRoleType,
    :name,
    :sensitivityCode,
    :expectedStartDate,
    :expectedEndDate,
    :actualStartDate,
    :actualEndDate,
    :expectedOutcomeID,    
    :expectedOutcomeName,
    :outcomeAchieved,
    :unitsDelivered,
    :authorizedUnits,
    :estimatedCost,
    :actualCost,
    :status,  
    :caseID,
    :unitType,
    :orgObjectReference,
    :orgObjectType,
    :userName,
    :ownerName

FROM
  PlannedItem,
  PlannedSubGoal,
  PlannedGoal,
  PlanItem,
  OrgObjectLink,
  CaseHeader,
  ConcernRole,
  Users,
  Outcome
  
WHERE PlannedItem.plannedItemID = :plannedItemID
  AND ConcernRole.concernRoleID = PlannedItem.concerningID
  AND PlannedItem.plannedSubGoalID = PlannedSubGoal.plannedSubGoalID 
  AND PlannedSubGoal.plannedGoalID = PlannedGoal.plannedGoalID
  AND PlanItem.planItemID = PlannedItem.planItemID
  AND PlannedGoal.caseID = CaseHeader.caseID
  AND OrgObjectLink.orgObjectLinkID = CaseHeader.ownerOrgObjectLinkID
  AND Users.userName = OrgObjectLink.userName
  AND Outcome.outcomeId = PlannedItem.expectedOutcomeID