February 4, 2011 at 2:28 am
Hello all,
i'm trying to find a solution for the following problem, maybe recursion is an answer.
I have the Ordertable where the order amount per customer ist stored.
I have the ShippedTable where the actual shipped amount is stored
OrderTable
Priority | Customer | OrderQuantity
1 | A | 3
2 | B | 2
ShippedTable
ShippedQuantity | ShippedDate
4 | 20110114
1 | 20110121
Now i want to allocate the Shipped quantity to the orders according to priority flag.
On 20110114 the Final table should look like this:
FinalTable
Customer | Shipped quantity | Shipped Date
A | 3 | 20110114
B | 1 | 20110114
On 20110121 the Final table should look like this:
FinalTable
Customer | Shipped quantity | Shipped Date
A | 3 | 20110114
B | 1 | 20110114
B | 1 | 20110121
Any help or ideas would be much appreciated!
February 4, 2011 at 3:03 pm
I'm not fully understand the business case:
You shipped a quantity X on a given day to more than one customer. Wouldn't you need to know the address of each customer to ship a specific quantity?
Shouldn't your desired result table already be there?
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply