Hi all,
I have a detail table with a CurrencyID, Conversion Rate and Conversion Date. Each CurrencyID will have multiple records for different dates that the conversion rate was changed.
How can I get a query to return the latest rate for each CurrencyID?
I can't use a simple WHERE clause because there may not be a record for each CurrencyID for every date, let alone today's date.
I can make changes to the database, perhaps the Currency master table should get updated with the latest date and conversion rate? That would make things simple. I like to avoid static fields like this though.
Thoughts anyone?
I have a detail table with a CurrencyID, Conversion Rate and Conversion Date. Each CurrencyID will have multiple records for different dates that the conversion rate was changed.
How can I get a query to return the latest rate for each CurrencyID?
I can't use a simple WHERE clause because there may not be a record for each CurrencyID for every date, let alone today's date.
I can make changes to the database, perhaps the Currency master table should get updated with the latest date and conversion rate? That would make things simple. I like to avoid static fields like this though.
Thoughts anyone?