Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Morning to all,
I need to get latest 2 date fields during load to process another statement. How can we achieve this during load of QVD.
Is there any function or way to get only latest 'N' dates from a QVD. BELOW is the sample with expected result
eg:
I have following data
01/12/2014
15/12/2014
31/12/2014
01/01/2015
31/01/2015
expected result
Hi Manoj,
It should be something like
Date: LOAD Date, Year(Date) AS Year INLINE [ Date 01/12/2014 15/12/2014 31/12/2014 01/01/2015 31/01/2015 ]; MaxDatesPerYear: LOAD Year, Date(Max(Date)) AS SelectedDate RESIDENT Date GROUP BY Year; DROP TABLE Date;
Date: LOAD Date, Year(Date) AS Year INLINE [
Date
]; MaxDatesPerYear: LOAD Year, Date(Max(Date)) AS SelectedDate RESIDENT Date GROUP BY Year; DROP TABLE Date;
Miguel
EDIT: Reviewed code