7 Replies Latest reply: Nov 3, 2010 8:32 AM by umangu2000 RSS

    Editing Script

      Hi,

      I have a small problem for which I am not able to find a solution. I have got three different tables which gives the Cost details for the product by different cost centers.

      CostCentre1:

      ProductID & Cost1

      CostCentre2:

      ProductID & Cost2

      CostCentre3:

      ProductID & Cost3

      CostCentre4:

      ProductID & Cost4

       

      As all the four data files are coming from different sources, I load each seprately and then join them together . So my final table looks like

      CostCentre:

      ProductID, Cost1, Cost2, Cost3 , Cost4

       

      Now what I want to do is that I want to define a variable which counts how many cost centers allocated cost to the product & what was the maximum cost

       

      Hence my final table should look like

      ProductID, Cost1, Cost2, Cost3 , Cost4, #Costs, MaxCost

       

      Pls help