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
)
)
)
|