2 Replies Latest reply: Sep 25, 2017 2:35 AM by Przemyslaw Rybacki RSS

    Master Calendar

    Przemyslaw Rybacki

      Hallo!

       

      I'm trying to make master calendar for reports.

       

      Min date must be hard coded 20140101 and Max today + 1825 days

       

      This is what I have:

       

      Let vMinDate = Num(DATE('20140101');

      Let vMaxDate = Num(DATE(Today()+1825);

       

       

      TempCalendar:

      LOAD

         $(vMinDate)+IterNo()-1 as Num

      AUTOGENERATE 1 WHILE $(vMinDate)+IterNo()-1<= $(vMaxDate);

       

       

      Calendar:

      LOAD

        num(floor(Num)) as Date,

        Week(Num) as Week,

        Year(Num) as Year,

        Month(Num) as Month,

        Num(Month(Num)) as MonthNo,

        Day(Num) as Day,

        Weekday(Num) as WeekDay,

        Ceil(month(Num)/3) AS Quarter,

        Year(Num)&'-'& Week(Num) as YearWeek

      RESIDENT TempCalendar;

      store......

      Drop Tables TempCalendar;

       

      Problem appears when I'm loading data:

       

      The following error occurred:

      Field '<=' not found

       

      The error occurred here:

      ?

      Data has not been loaded. Please correct the error and try loading again.

       

      Do you know what might be reason?