I have problem with exchange rate. I have two tables A (order_number, order_date, currency) and B (date, currency, exchange_rate). I created key (date¤cy) and it's working perfectly, but..
On each Monday I don't have exchange rate value, becaus it's announced on Tuesday. In this case I sholud use exchange rate from last day when it was announced (in this case from Friday). How to do this?
I need this value when I create a straight table and I'm converting currency: