Hi,
I need help solving this problem:
I need to go trough the table and for OrderID and OrderLine
(I pass as a function arguments) loop as long as Sum of RelQTY is Less or equal then QTY(I pass as a third argument) and when this happend ,returnd value of RelDate field of a record.Ex:
OrderID OrderLine RelQTY RelDate
1001 1 5 5/4/01
1001 1 10 6/5/01
1001 1 5 6/10/01
So if i pass(1001,1,16) I loop trough table till Sum(RelQTY)<=16 and since that is on second record I need to return RelDate of 6/5/01
thanks for any idea ,
Lyn
I need help solving this problem:
I need to go trough the table and for OrderID and OrderLine
(I pass as a function arguments) loop as long as Sum of RelQTY is Less or equal then QTY(I pass as a third argument) and when this happend ,returnd value of RelDate field of a record.Ex:
OrderID OrderLine RelQTY RelDate
1001 1 5 5/4/01
1001 1 10 6/5/01
1001 1 5 6/10/01
So if i pass(1001,1,16) I loop trough table till Sum(RelQTY)<=16 and since that is on second record I need to return RelDate of 6/5/01
thanks for any idea ,
Lyn