3 Replies Latest reply: Sep 3, 2014 6:16 PM by Marco Wedel RSS

    Maximum Date for Each Month From a Table in Scripting

      Hi All,

       

      I have a situation where I have thousand row of data to the corresponding dates on the calendar. Now I want to pull the data only for the maximum date of each month in load script. Please help or suggest a solution for this.

       

      For example

      Act_IdAct_DateAct_CountryTM_OpenTM_Flag
      102-07-2014India23Open
      229-07-2014Australia340Open
      304-07-2014Hong Kong2643Open
      405-07-2014Malasiya1711Open
      506-07-2014Saudi Arabia2923Open
      910-07-2014India1925Open
      1011-07-2014Australia541Open
      1101-08-2014Hong Kong764Open
      1707-08-2014India1391Open
      1808-08-2014Australia1390Open
      1909-08-2014Hong Kong1549Open
      2010-08-2014Malasiya437Open
      2130-08-2014Saudi Arabia995Open

       

      So the solution from the script should get me row num 2 as 340 for July-2014 and row num 21 for Aug 2014. Hope this make the query clear to answer.

       

      Many thanks in advance.