Hi friends,
I'm working on a query that will calculate a total based on an order's date. If the order is/was placed before 7/15, then they receive a certain flexible percentage of free overproduction. If the order is placed after this date, they receive a different quantity of overproduction, for which they are charged.
Basically, I want to make a calculation that will first call a date variable and compare it to 7/15/2004, and if it is on or before that date, to add a percentage called from a different table to the total order quantity but not to the order price. If the date is 7/16/2004 or after, the total quantity would increase by another percentage from a different table and the order price would increase accordingly.
Should I approach this as two queries? I'm starting off in that direction to see what happens when I try to build the comparison query. I could really use some help on this - I've got a nice form going for my users, but I need to get a few calculations figured out before it is of any real use, and I'm a bit overwhelmed by the query process. No hablo SQL, but I am eager to learn.
TIA
Regards,
Nedstar1
I'm working on a query that will calculate a total based on an order's date. If the order is/was placed before 7/15, then they receive a certain flexible percentage of free overproduction. If the order is placed after this date, they receive a different quantity of overproduction, for which they are charged.
Basically, I want to make a calculation that will first call a date variable and compare it to 7/15/2004, and if it is on or before that date, to add a percentage called from a different table to the total order quantity but not to the order price. If the date is 7/16/2004 or after, the total quantity would increase by another percentage from a different table and the order price would increase accordingly.
Should I approach this as two queries? I'm starting off in that direction to see what happens when I try to build the comparison query. I could really use some help on this - I've got a nice form going for my users, but I need to get a few calculations figured out before it is of any real use, and I'm a bit overwhelmed by the query process. No hablo SQL, but I am eager to learn.
TIA
Regards,
Nedstar1