Operation Details
Description: Gets a currency for one currency type and specific date (i.e. rateFromDate <= input_Date <= rateToDate)
Sterotype: ns
SQL
SELECT
  currencyExchangeID,
  currencyTypeCode,
  rate,
  rateFromDate,
  rateToDate
INTO
  :currencyExchangeID,
  :currencyTypeCode,
  :rate,
  :rateFromDate,
  :rateToDate 
FROM
  CurrencyExchange 
WHERE :currencyTypeCode = currencyTypeCode 
  AND :theDate >= rateFromDate 
  AND 
  (
    
    (
      :theDate <= rateToDate 
    ) 
    OR 
    (
      rateToDate IS NULL 
    ) 
  ) 
  AND :statusCode = statusCode