Operation Details
Description: Returns current product delivery pattern info dtls by product delivery pattern id, recordStatus, effectiveDate.
Sterotype: ns
SQL
SELECT
  productDeliveryPatternInfoID,
  productDeliveryPatternID,
  deliveryMethodID,
  name,
  nameTextID,
  maximumAmount,
  deliveryFrequency,
  coverPattern,
  offset,
  fromDate,
  recordStatus,
  comments,
  commentsTextID,
  versionNo
INTO
  :productDeliveryPatternInfoID,
  :productDeliveryPatternID,
  :deliveryMethodID,
  :name,
  :nameTextID,
  :maximumAmount,
  :deliveryFrequency,
  :coverPattern,
  :offset,
  :fromDate,
  :recordStatus,
  :comments,
  :commentsTextID,
  :versionNo 
FROM
  ProductDeliveryPatternInfo 
WHERE 
  (
    :productDeliveryPatternID = productDeliveryPatternID 
  ) 
  AND 
  (
    :recordStatus = recordStatus 
  ) 
  AND 
  (
    fromDate = 
    ( 
    SELECT
      MAX(fromDate) 
    FROM
      ProductDeliveryPatternInfo 
    WHERE 
      (
        :productDeliveryPatternID = productDeliveryPatternID 
      ) 
      AND 
      (
        :recordStatus = recordStatus 
      ) 
      AND 
      (
        fromDate <= :effectiveDate 
      ) 
    ) 
  )