How it works…

The main purpose of creating this exchange rate calendar is to tag the exchange rates for every missing date in the range. The initial data only comes with the rate start dates. So, we create a rate end date for each exchange rate using the Peek() function. The Peek() function checks for the last read record for FromCurrency and, if it matches, it generates a rate end date of current RateStartDate -1. If FromCurrency doesn't match, then the rate end date is set to today's date. Using these start and end dates, the calendar is generated.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset