D
dave
I have two tables - Transactions and Rates.
Table: Txns
Refce TxnDate Curr Amount
10 21/03/2006 USD 10.87
11 10/04/2006 USD 20.00
Table: Rates
Curr RateDate Rate
EUR 01/01/2006 1.41
USD 01/01/2006 1.80
USD 01/03/2006 1.81
USD 01/04/2006 1.82
USD 01/05/2006 1.83
I want to link these tables in a Query so that I can value the
transactions using the currency rate in force at the transaction date.
In this example, for Refce=10, the rate should be 1.81; for Refce=11,
it should be 1.82.
If only a forward dated rate is found, it should be ignored.
All dates are ddmmyyyy
Can this be done in a single Query?
Can anyone help with the SQL please?
Thanks
Dave
Table: Txns
Refce TxnDate Curr Amount
10 21/03/2006 USD 10.87
11 10/04/2006 USD 20.00
Table: Rates
Curr RateDate Rate
EUR 01/01/2006 1.41
USD 01/01/2006 1.80
USD 01/03/2006 1.81
USD 01/04/2006 1.82
USD 01/05/2006 1.83
I want to link these tables in a Query so that I can value the
transactions using the currency rate in force at the transaction date.
In this example, for Refce=10, the rate should be 1.81; for Refce=11,
it should be 1.82.
If only a forward dated rate is found, it should be ignored.
All dates are ddmmyyyy
Can this be done in a single Query?
Can anyone help with the SQL please?
Thanks
Dave