2 Replies Latest reply: Mar 17, 2017 11:55 AM by Robert Svebeck RSS

    Check if QVD File Exists, if it exists, load it, if not, make a full search on the DB

    Victor Olade

      Hello,

       

      I need help troubleshooting this script:

       

      // Check if QVD File Exists, if exists load it if not make a full search on the DB

      LET vQVDexists = isnull(QvdCreateTime('lib://ConfigData/ROIMEDIA.qvd'));

       

      if $(vQVDexists) = 0 then

        TRACE( 'QVD Exists' );

          Main:

        LOAD * FROM 'lib://ConfigData/ROIMEDIA.qvd' (qvd);

          LET vMaxDate = Peek('Date',-1);

          LET vMaxTime = Peek('Time',-1);

      Else

        TRACE( 'QVD Do not Exists' );

          SET vMaxDate = ;

          SET vMaxTime = ;

      end if;

      TRACE 'Max Date: ' $(vMaxDate);

      TRACE 'Max Time: ' $(vMaxTime);

       

      I get the error on the attached image when I try to load.

       

       photo Qlik picture_zpsbijyx0cx.png