Operation Details
Description:  
Sterotype: nsmulti
SQL
SELECT 
  Obligation.obligationID,
  Obligation.transactionType,
  Obligation.debitCreditType,
  Obligation.amount,
  Obligation.creationDate,
  Obligation.relatedType,
  Obligation.relatedID,
  Obligation.startDate,
  Obligation.endDate,
  Obligation.fundFiscalYearID,
  Obligation.versionNo
INTO 
  :obligationID, 
  :transactionType,
  :debitCreditType,
  :amount,
  :creationDate,
  :relatedType,
  :relatedID,
  :startDate,
  :endDate,
  :fundFiscalYearID,
  :versionNo
FROM 
  Obligation,
  FundedItemRulesLink, 
  ProductDeliveryPlanItemLink,
  ProductDelivery,
  PlannedItem
WHERE 
ProductDeliveryPlanItemLink.caseID = ProductDelivery.caseID 
AND PlannedItem.planneditemID = ProductDeliveryPlanItemLink.planneditemid 
AND PlannedItem.planneditemID = Obligation.relatedID 
AND ProductDelivery.productID = FundedItemRulesLink.relatedID 
AND FundedItemRulesLink.relatedID = :relatedID 
AND Obligation.relatedType = :relatedType
AND Obligation.creationDate >= :startDate AND (Obligation.creationDate <= :endDate OR :endDate is NULL)