Hi Team, Can you please help with below query.I need to compare two consecutive rows (if BEGDA of second row is 1 day greater than ENDDA of first row then I need to pick First row BEGDA and 2nd row ENDDA)Input Table Data: PERNR SUBTY BEGDA ENDDA101042 900 1/1/2008 1/15/2015101042 1000 1/1/2008 12/31/2008101042 1000 1/1/2009 12/31/2009101042 2000 1/1/2008 1/15/2008101042 2000 1/16/2008 12/31/2008101042 2000 1/1/2009 12/31/2009101042 3000 1/1/2008 12/31/2008101042 3000 1/1/2009 12/31/2009101042 3000 1/5/2010 12/31/9999101042 DDPP 5/16/2007 12/31/2007101042 DDPP 2/16/2007 5/15/2007101042 MAPP 2/1/2007 12/31/2007101042 VISI 3/1/2007 12/31/2007 Output should be like this: PERNR SUBTY BEGDA ENDDA101042 900 1/1/2008 1/15/2015101042 1000 1/1/2008 12/31/2009101042 2000 1/1/2008 12/31/2009101042 3000 1/1/2008 12/31/2009101042 3000 1/5/2010 12/31/9999101042 DDPP 2/16/2007 12/31/2007101042 MAPP 2/1/2007 12/31/2007101042 VISI 3/1/2007 12/31/2007
↧