Hi There, need some help.I have list of prices and the dates they are valid from and to. For Example:Date From Date To Price20/06/2013 26/08/2013 199.9927/08/2013 21/01/2014 199.993/10/2013 31/10/2013 149.992/11/2013 7/11/2013 149.9925/11/2013 26/11/2013 149.9927/11/2013 29/11/2013 14030/11/2013 5/12/2013 149.996/12/2013 6/12/2013 1407/12/2013 25/12/2013 149.9914/01/2014 14/01/2014 119.99Some Prices overlap so the actual price that is valid is the lowest price, so for example while the entry for 199.99 is from the 27/08/2013-21/01/2014, when the lower price of 149.99 comes into effect on the 3/10/2013 then 149.99 is the actual price.What I want to do is to break this down to actual active periods and if possible combine periods where the value is the same, so for the example above the result would be :Date From Date To Price20/06/2013 2/10/2013 199.993/10/2013 31/10/2013 149.991/11/2013 1/11/2013 199.992/11/2013 7/11/2013 149.998/11/2013 24/11/2013 199.9925/11/2013 26/11/2013 149.9927/11/2013 29/11/2013 14030/11/2013 5/12/2013 149.996/12/2013 6/12/2013 1407/12/2013 25/12/2013 149.9926/12/2013 13/01/2014 19914/01/2014 14/01/2014 119.9915/01/2014 21/01/2014 199.99I am struggling to come up with a solution after trying for a number of days.Any suggestions welcomed.Thanks
↧