Hello All,
I am facing a issue as follows:
I have sale quantity and stock Quantity for some items for the month of some month as shown below:-
TABLE Sale
Tdate | Item | Sale_Qty |
1-Feb-12 | 1 | 100 |
2-Feb-12 | 1 | 5 |
1-Feb-12 | 2 | 20 |
2-Feb-12 | 2 | 5 |
TABLE Stock
Tdate | Item | Stock_Qty |
1-Feb-12 | 1 | 50 |
2-Feb-12 | 1 | 200 |
1-Feb-12 | 2 | 100 |
2-Feb-12 | 2 | 300 |
Now my requirement is i want to know in number of days in which the total sale quantity for the month is greater than the stock quantity per day .
like if i select February month then for the month of february for item '1' i have saleQuantity as 105 which will be compared with daily stock for itemcode '1' for feb monthwhich is 50,200 .since 105 is greater than 50 so result should come as 1 as on 1-Feb-2012 is the only day on which total quantity is greater than the stock.
I am attaching the application for refernce .Please do let me know if you need more clarification.
Regards,
Yashpal Singh Rawat