paul29berks
Active Member
- Joined
- Mar 15, 2004
- Messages
- 293
I am trying to write a query based on the following criteria:
* I am using 2 tables - Table 1 tells me standard discount rates by each product, Table 2 = actual discounts that have been processed.
* I have found for each product in the standard discount table there are several entries in the actual discounts tables.
Does anyone have any suggestions on how I can write a query which makes the following assumptions:
1) If more than 1 entry found take the lowest discount rate?
*2) If I have a standard discount rate of 25% for a limited period i.e a start date of 200101 and an end date of 20010301. How can I write a query that tells me if start date = x and end date = Y discount = Z?
Many Thanks
* I am using 2 tables - Table 1 tells me standard discount rates by each product, Table 2 = actual discounts that have been processed.
* I have found for each product in the standard discount table there are several entries in the actual discounts tables.
Does anyone have any suggestions on how I can write a query which makes the following assumptions:
1) If more than 1 entry found take the lowest discount rate?
*2) If I have a standard discount rate of 25% for a limited period i.e a start date of 200101 and an end date of 20010301. How can I write a query that tells me if start date = x and end date = Y discount = Z?
Many Thanks