Hello All,
With the following structures
Have another table which will contain the Price of each item for Sale Price calculation. One item will have many prices and we should take the maximum price date and take that price for calculation.
Now there are various ways of doing that and I've done it using some three methods(Use Aggregation with Joiner, Use Sorted Input etc). But I would like to know suggestions from peers.
Thanks
Sri
With the following structures
Code:
Source
Item ID Qty
100 10
101 40
102 50
Target
ITEM_ID QTY_SOLD SALE_PRICE
....
...
...
Have another table which will contain the Price of each item for Sale Price calculation. One item will have many prices and we should take the maximum price date and take that price for calculation.
Code:
Price Table
ITEM_ID PRICE_EFF_DATE ITEM_PRICE
100 08/01/03 600
100 08/20/03 500
101 08/30/03 250
101 08/01/03 100
101 08/25/03 200
102 08/27/03 400
Now there are various ways of doing that and I've done it using some three methods(Use Aggregation with Joiner, Use Sorted Input etc). But I would like to know suggestions from peers.
Thanks
Sri