Operation Details
Description: Searches the PlannedItemAbsenceLink table using the service plan delivery id.
Sterotype: nsmulti
SQL
SELECT
  AbsencePeriod.absencePeriodID,
  AbsencePeriod.absenceDate,
  AbsencePeriod.absenceReason,
  AbsencePeriod.unitsUnattended,
  AbsencePeriod.creationDate,
  AbsencePeriod.createdBySystem,
  AbsencePeriod.periodStartDate,
  AbsencePeriod.periodEndDate,
  AbsencePeriod.recordStatus,
  AbsencePeriod.versionNo,
  PlannedItem.name,
  PlannedItem.plannedItemID
INTO
  :absencePeriodID,
  :absenceDate,
  :absenceReason,
  :unitsUnattended,
  :creationDate,
  :createdBySystem,
  :periodStartDate,
  :periodEndDate,
  :recordStatus,
  :versionNo,
  :name,
  :plannedItemID 
FROM
  PlannedItemAbsenceLink,
  AbsencePeriod,
  CaseHeader,
  PlannedItem,
  PlannedSubGoal,
  PlannedGoal 
WHERE 
  (
    PlannedItemAbsenceLink.plannedItemID = PlannedItem.plannedItemID 
  ) 
  AND 
  (
    AbsencePeriod.absencePeriodID = PlannedItemAbsenceLink.absencePeriodID 
  ) 
  AND 
  (
    PlannedItem.plannedSubGoalID = PlannedSubGoal.plannedSubGoalID 
  ) 
  AND 
  (
    PlannedSubGoal.plannedGoalID = PlannedGoal.plannedGoalID 
  ) 
  AND 
  (
    PlannedGoal.caseID = :caseID 
  ) 
  AND 
  (
    CaseHeader.caseID = PlannedGoal.caseID 
  ) 
ORDER BY AbsencePeriod.periodStartDate