Hello there,
I'm having a problem with array field comparision.
I have a table "Wrk-Table-Item" With fields:
Customer
Pur-Date
Qty
Price of the Item changes frequently, so I have to keep track when the price changes and the multiply the Qty purchased by the customer betwwen those dates. Something like
Price-Dt = 04/01/04 Price = 0.27
Price-Dt = 04/04/04 price = 0.24
Price-Dt = 04/18/04 price = 0.26
.........................................
.........................................
.........................................
price-dt = 04/27/04 Price = 0.31
price-dt = 04/29/04 Price = 0.22
And For "Wrk-Table-Item"
Customer = "123" Qty = 5 Dt-of-Pur = 04/01/04
Customer = "123" Qty = 10 Dt-Of-Pur = 04/04/04
Customer = "123" Qty = 3 Dt-Of-Pur = 04/10/04
...................................................................
...................................................................
...................................................................
The out put should be like
date qty rate
04/01/04 - 04/03/04 5 0.27
04/04/04 - 04/17/04 13 0.24
And I have created two arrays - Price-Dt[62] Price[62].
for the above purpose But not getting any success.
I'm not getting how to solve the problem:
Any help will be highly appreciated.
thanks
I'm having a problem with array field comparision.
I have a table "Wrk-Table-Item" With fields:
Customer
Pur-Date
Qty
Price of the Item changes frequently, so I have to keep track when the price changes and the multiply the Qty purchased by the customer betwwen those dates. Something like
Price-Dt = 04/01/04 Price = 0.27
Price-Dt = 04/04/04 price = 0.24
Price-Dt = 04/18/04 price = 0.26
.........................................
.........................................
.........................................
price-dt = 04/27/04 Price = 0.31
price-dt = 04/29/04 Price = 0.22
And For "Wrk-Table-Item"
Customer = "123" Qty = 5 Dt-of-Pur = 04/01/04
Customer = "123" Qty = 10 Dt-Of-Pur = 04/04/04
Customer = "123" Qty = 3 Dt-Of-Pur = 04/10/04
...................................................................
...................................................................
...................................................................
The out put should be like
date qty rate
04/01/04 - 04/03/04 5 0.27
04/04/04 - 04/17/04 13 0.24
And I have created two arrays - Price-Dt[62] Price[62].
for the above purpose But not getting any success.
I'm not getting how to solve the problem:
Any help will be highly appreciated.
thanks