batchman1974
MIS
I have two tables I need to join to an invoice table.
There are 4 primary keys on the invoice table:
account_num upc sales_id date
10 001005 356 04/01/2009
The other two tables, discount and promotion, describe specific incentives that are in place. The structure of these tables is as follows:
account_num upc sales_id begin_date end_date
10 001005 356 01/01/2009 05/31/2009
I'm trying to compare these feilds based on the date of the sale:
invoice.price, discount.price - promotion.price
My problem is I am unsure of how to join the invoice table given I have a date range rather than a list of dates that a particular promotion/discount would be in place.
Thanks in advance!
There are 4 primary keys on the invoice table:
account_num upc sales_id date
10 001005 356 04/01/2009
The other two tables, discount and promotion, describe specific incentives that are in place. The structure of these tables is as follows:
account_num upc sales_id begin_date end_date
10 001005 356 01/01/2009 05/31/2009
I'm trying to compare these feilds based on the date of the sale:
invoice.price, discount.price - promotion.price
My problem is I am unsure of how to join the invoice table given I have a date range rather than a list of dates that a particular promotion/discount would be in place.
Thanks in advance!