Guys need help to calculate the following
Need to calculate b4 and after, below shows the data example
The idea is to find the total of stock (Which I can calculate) and then use this value at the earliest transaction hence the last transaction in this case, and add qty to the total per transaction line.
Any help well be very much appreciated
data form system
Date Qty cre date time
28/05/2010 -1.00 28/05/2010 0823
28/05/2010 -1.00 28/05/2010 0822
27/05/2010 -1.00 27/05/2010 1116
27/05/2010 5.00 27/05/2010 0837
27/05/2010 -15.00 27/05/2010 0820
required output
Date Qty cre date time b4 after
28/05/2010 -1.00 28/05/2010 0823 800 799
28/05/2010 -1.00 28/05/2010 0822 801 800
27/05/2010 -1.00 27/05/2010 1116 802 801
27/05/2010 5.00 27/05/2010 0837 797 802
27/05/2010 -15.00 27/05/2010 0820 812 797
thanks
CR 8.5
Need to calculate b4 and after, below shows the data example
The idea is to find the total of stock (Which I can calculate) and then use this value at the earliest transaction hence the last transaction in this case, and add qty to the total per transaction line.
Any help well be very much appreciated
data form system
Date Qty cre date time
28/05/2010 -1.00 28/05/2010 0823
28/05/2010 -1.00 28/05/2010 0822
27/05/2010 -1.00 27/05/2010 1116
27/05/2010 5.00 27/05/2010 0837
27/05/2010 -15.00 27/05/2010 0820
required output
Date Qty cre date time b4 after
28/05/2010 -1.00 28/05/2010 0823 800 799
28/05/2010 -1.00 28/05/2010 0822 801 800
27/05/2010 -1.00 27/05/2010 1116 802 801
27/05/2010 5.00 27/05/2010 0837 797 802
27/05/2010 -15.00 27/05/2010 0820 812 797
thanks
CR 8.5