Hi Guy
This is for Payroll Calculation. I need to calculate based on date So plzz help on this ..I have listed example table
person_id Assign_id Effective DAte Temp_id_old temp_id_new updated _date
8076 143 15 Jul 2011 47 48 5 sep 2011
8076 143 15 Aug 2011 48 49 8 Sept 2011
8076 143 10 Sep 2011 49 50 10 sep 2011
Open Period is 1-sep-2011 to 30-sep-2011
For this Above Table, Ihe Result should be below
1) 15 jul 2011 14 Aug 2011 47 48
2) 15 Aug 2011 31 Aug 2011 48 49
3) 1 sep 2011 9 Sep 2011 49 49
4)10 Sep 2011 31 Sep 2011 49 50
Thankz in advance