4 Replies Latest reply: Jan 27, 2013 4:11 PM by hkontrafou RSS

    LOAD TABLE/ AUTOGENERATE

      Hello all,

       

      I am new with the QV and working on the training.

      I can't load the resident table I create, here is the script

       

      Tempcalendar:

      LOAD

      $(VARMINDATE)+ROWNO()-1 AS DATENUMBER,

      DATE ($(VARMINDATE)+ROWNO()-1) AS TEMPDATE,

      AUTOGENERATE $(VARMAXDATE)-$(VARMINDATE)+1;

      no error message pops up,

      The debugger shows,

      VARTODAY41301

      VARMAXDATE<NULL>

      VARMINDATE<NULL>

       

      Is there something wrong with the autogenerate?

       

      THANK YOU!  

        • Re: LOAD TABLE/ AUTOGENERATE
          Juan Gerardo Cabeza Luque

          You have a syntax error due to the comma before AutoGenerate. But I think your problem should be in the variable assignments. If you try the following script, it will work:

           

          SET VARMINDATE = MakeDate(2012, 1, 1);

          SET VARMAXDATE = MakeDate(2012, 12, 31);

             

          Tempcalendar:

          LOAD

          $(VARMINDATE)+ROWNO()-1 AS DATENUMBER,

          DATE ($(VARMINDATE)+ROWNO()-1) AS TEMPDATE

          AutoGenerate $(VARMAXDATE)-$(VARMINDATE)+1;

           

           

          JG