I have a [Price] table like this
Date Product Price
1-1-2012 Potion 500 1-1-2012 Elixir 5000 1-10-2012 Potion 600
Table [Transaction]
Date Element Amount
1-1-2012 Potion 1
1-5-2012 Potion 1
I need to join these tables, with price and transaction side by side. Rule: if the date is not found in [Price], use the latest price
So, 1-5-2012 Potion will cost 500
The result should be like this:
Date Item Amount Price
1-1-2012 Potion 1,500
1-5-2012 Potion 1,500
So, I do not know how to do this, please help if you know the solution. Thanks
source share