E
Elielson via AccessMonster.com
Hello
I wonder if anyone can help please.
Prices of products have an effective (valid from) date.
I.e. a 1kg of Rice cost £2 from 20/09/07; £1.80 from the 25/09/07, etc.
I have two tables:
a) tbl_invoices with the fields
InvNumber, Date; Product;
Eg. Data corresponding:
1 / 10/10/07 / a
1 / 10/10/07 / b
2 / 12/10/07 / a
3 / 17/10/07 / a
b) tbl_prices
Product; Valid_from; Price
E.g data:
a / 09/10/07 / 09
a / 11/10/07 / 11
b / 01/10/07 / 2
a / 01/10/07 / 5
a / 15/10/07 / 13
What is the query to pull the right price for those invoices please. Thanks.
I wonder if anyone can help please.
Prices of products have an effective (valid from) date.
I.e. a 1kg of Rice cost £2 from 20/09/07; £1.80 from the 25/09/07, etc.
I have two tables:
a) tbl_invoices with the fields
InvNumber, Date; Product;
Eg. Data corresponding:
1 / 10/10/07 / a
1 / 10/10/07 / b
2 / 12/10/07 / a
3 / 17/10/07 / a
b) tbl_prices
Product; Valid_from; Price
E.g data:
a / 09/10/07 / 09
a / 11/10/07 / 11
b / 01/10/07 / 2
a / 01/10/07 / 5
a / 15/10/07 / 13
What is the query to pull the right price for those invoices please. Thanks.