Operation Details
Description: Search to retrieve records based on caseID, category, status code and cover period.
Sterotype: nsmulti
SQL
SELECT
  instructLineItemID,
  amount,
  unprocessedAmount,
  instructLineItemCategory,
  instructionLineItemType,
  financialCompID,
  coverPeriodFrom,
  coverPeriodTo,
  effectiveDate,
  creationDate,
  statusCode,
  caseID,
  finInstructionID,
  concernRoleID,
  caseNomineeID,
  primaryClientID,
  deliveryMethodType,
  creditDebitType,
  currencyExchangeID,
  currencyTypeCode,
  adjustmentInd,
  adjustmentFrequency,
  nextAdjustmentDate,
  instrumentGenInd,
  fundID,
  maximumAmount,
  versionNo,
  dueDate,
  inRespectOfID
INTO
  :instructLineItemID,
  :amount,
  :unprocessedAmount,
  :instructLineItemCategory,
  :instructionLineItemType,
  :financialCompID,
  :coverPeriodFrom,
  :coverPeriodTo,
  :effectiveDate,
  :creationDate,
  :statusCode,
  :caseID,
  :finInstructionID,
  :concernRoleID,
  :caseNomineeID,
  :primaryClientID,
  :deliveryMethodType,
  :creditDebitType,
  :currencyExchangeID,
  :currencyTypeCode,
  :adjustmentInd,
  :adjustmentFrequency,
  :nextAdjustmentDate,
  :instrumentGenInd,
  :fundID,
  :maximumAmount,
  :versionNo,
  :dueDate,
  :inRespectOfID 
FROM
  InstructionLineItem 
WHERE caseID = :caseID 
  AND instructLineItemCategory = :instructLineItemCategory 
  AND statusCode = :statusCode 
  AND 
  (
    coverPeriodFrom >= :coverPeriodFrom 
    OR :coverPeriodFrom IS NULL 
  ) 
  AND 
  (
    coverPeriodTo <= :coverPeriodTo 
    OR :coverPeriodTo IS NULL 
  )