Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Date | IDPv | Product | PriceCF | PriceCS | PriceSF | PriceST |
---|---|---|---|---|---|---|
12/04/2012 | 1145 | 9 | 1,04 | |||
12/04/2012 | 1145 | 9 | 2,06 | |||
12/04/2012 | 1145 | 9 | 1,24 | |||
12/04/2012 | 1145 | 9 | 2,19 | |||
12/04/2012 | 2265 | 9 | 1,45 | |||
12/04/2012 | 2265 | 9 | 1,67 | |||
12/04/2012 | 2265 | 9 | 1,98 | |||
12/04/2012 | 2265 | 9 | 2,44 | |||
13/04/2012 | 1145 | 5 | 2,33 | |||
13/04/2012 | 1145 | 5 | 1,62 | |||
13/04/2012 | 1145 | 5 | ||||
13/04/2012 | 1145 | 5 | 1,41 |
Date | IDPv | Product | PriceCF | PriceCS | PriceSF | PriceST |
---|---|---|---|---|---|---|
12/04/2012 | 1145 | 9 | 1,04 | 2,06 | 1,24 | 2,19 |
12/04/2012 | 2265 | 9 | 1,45 | 1,67 | 1,98 | 2,44 |
13/04/2012 | 1145 | 5 | 2,33 | 1,62 | 1,41 |
By using the following script, you can get the table Data which gives the result you want.
Temp:
LOAD * Inline [
Date,IDPv,Product,PriceCF,PriceCS,PriceSF,PriceST
12/04/2012,1145,9,1.04,,,
12/04/2012,1145,9,,2.06,,
12/04/2012,1145,9,,,1,24,
12/04/2012,1145,9,,,,2.19
12/04/2012,2265,9,1.45,,,
12/04/2012,2265,9,,1.67,,
12/04/2012,2265,9,,,1.98,
12/04/2012,2265,9,,,,2.44
13/04/2012,1145,5,2.33,,,
13/04/2012,1145,5,,1.62,,
13/04/2012,1145,5,,,,
13/04/2012,1145,5,,,,1.41
];
Data:
NoConcatenate LOAD Date, IDPv, Product, Sum(PriceCF) as SPriceCF, Sum(PriceCS) as SPriceCS, Sum(PriceSF) as SPriceSF, Sum(PriceST) as SPriceST Resident Temp Group By Date, IDPv, Product;
Drop Table Temp;
May be this will help. Add script to suppress null values.
Kiran Rokkam.
By using the following script, you can get the table Data which gives the result you want.
Temp:
LOAD * Inline [
Date,IDPv,Product,PriceCF,PriceCS,PriceSF,PriceST
12/04/2012,1145,9,1.04,,,
12/04/2012,1145,9,,2.06,,
12/04/2012,1145,9,,,1,24,
12/04/2012,1145,9,,,,2.19
12/04/2012,2265,9,1.45,,,
12/04/2012,2265,9,,1.67,,
12/04/2012,2265,9,,,1.98,
12/04/2012,2265,9,,,,2.44
13/04/2012,1145,5,2.33,,,
13/04/2012,1145,5,,1.62,,
13/04/2012,1145,5,,,,
13/04/2012,1145,5,,,,1.41
];
Data:
NoConcatenate LOAD Date, IDPv, Product, Sum(PriceCF) as SPriceCF, Sum(PriceCS) as SPriceCS, Sum(PriceSF) as SPriceSF, Sum(PriceST) as SPriceST Resident Temp Group By Date, IDPv, Product;
Drop Table Temp;
Thank!