4 Replies Latest reply: May 19, 2017 11:57 AM by Filiberto Cacciari RSS

    Use of "where" in load script

    Filiberto Cacciari

      Hello guys,

       

      my final target is to exclude from the load values.

       

      The field is a text field, it's the "Filename" of QVD but is composed like YearMonth.

       

      Then I tried to use a variable to exclude always the "Filename" before the last 3 YearMonth.

       

      This is my script but using where at the end of my load seems tha doesn't work.

       

      Here is my script and my qvw.

       

      //////////

       

      let vLast3PrevM = date(Floor(MonthEnd(AddMonths(Today(),-3))),'YYYYMM');

       

      LOAD * INLINE [

          Filename

          201701.QVD

          201702.QVD

          201703.QVD

          201704.QVD

      ]

       

      where date(Floor(MonthEnd(AddMonths(Makedate(Mid(Filename,1,4),Mid(Filename,5,2),Mid(Filename,7,2)),0))),'YYYYMM') > $(vLast3PrevM);

       

      /////////

       

      Thanks for your help.

       

      gwassenaar bpn stalwar1 swuehl