JeffMachine
MIS
I have various sales and orders queries that I must now link to a currency table to convert to USD.
The currency table looks like this:
currency fromdate rate
USD 1900-01-01 78.44
USD 2006-08-31 77.839
USD 2006-09-30 79.001
USD 2006-10-30 78.802
SO, to be able to do the conversion I need to get the rate for the order/invoice date.
If the order/invoice date is before 8/31/2006 a rate of 78.44 is used.
If the order/invoice date is between 8/31/2006 and 9/29/2006 a rate of 77.839 is used.
If the order/invoice date is between 9/30/2006 and 10/29/2006 a rate of 79.001 is used. And so on.
How can I link to this table using the other table's transaction date to return the correct rate?
Thanks ....
The currency table looks like this:
currency fromdate rate
USD 1900-01-01 78.44
USD 2006-08-31 77.839
USD 2006-09-30 79.001
USD 2006-10-30 78.802
SO, to be able to do the conversion I need to get the rate for the order/invoice date.
If the order/invoice date is before 8/31/2006 a rate of 78.44 is used.
If the order/invoice date is between 8/31/2006 and 9/29/2006 a rate of 77.839 is used.
If the order/invoice date is between 9/30/2006 and 10/29/2006 a rate of 79.001 is used. And so on.
How can I link to this table using the other table's transaction date to return the correct rate?
Thanks ....