R
Roland Greve
Hi all,
I'm currently looping through a filtered recordset to find an exchange rate
on a given date. This is working ok, but it's getting slower and slower as
the exchange rate table grows.
My tblExchangeRates looks like this (local currency is EUR):
ValidityDate ForeignCurrency ExchangeRate
15-07-03 USD 1,1328
31-07-03 USD 1,1464
28-08-03 USD 1,1283
15-07-03 AUD 1,7171
31-07-03 AUD 1,7316
What would be the quickest way to return the last known exchange rate for a
particular currency on a given date. The function FindMyExchangeRate("USD",
"17-08-03") should return 1,1464 (the USD exchange rate on the last known
date "31-07-03" before or equal to the given date "17-08-03").
I hope this is somewhat clear.
Regards,
Roland
I'm currently looping through a filtered recordset to find an exchange rate
on a given date. This is working ok, but it's getting slower and slower as
the exchange rate table grows.
My tblExchangeRates looks like this (local currency is EUR):
ValidityDate ForeignCurrency ExchangeRate
15-07-03 USD 1,1328
31-07-03 USD 1,1464
28-08-03 USD 1,1283
15-07-03 AUD 1,7171
31-07-03 AUD 1,7316
What would be the quickest way to return the last known exchange rate for a
particular currency on a given date. The function FindMyExchangeRate("USD",
"17-08-03") should return 1,1464 (the USD exchange rate on the last known
date "31-07-03" before or equal to the given date "17-08-03").
I hope this is somewhat clear.
Regards,
Roland