3 Replies Latest reply: Jan 8, 2013 10:13 AM by Adam Wilson RSS

    Need for erasing QVD s?

    Michael Ionkin

      Hello,

       

      I've just finished my first loading script. Yabadibaduu!

       

      But Im not sure whether its nicely programmed as I'm all the time storing and loading qvd s which I don't need in the end anymore.

      Im not sure whether I should just delete the qvd s via DOS (cmd command) at the end OR whether I should the whole time use resident tables and after avery process step the earlies tables...

      Maybe someone can show me how the design should look like.

       

      Here are three of my tabs (I proceed like that for 10 further tabs) - Thanks for your help!  :

       

      ---------------------------------TAB1--------------------------------
      TOL_NEW:

      LOAD lTolRef,
           lTolTypRef,
           sDepot,
           sDescript,
           sName
      FROM
      ..\..\02_Data\TOL_MI.qvd
      (qvd)
      Where ( (lTolTypRef = 10) OR (lTolTypRef = 20) OR (lTolTypRef = 30) )
      ;


      Left Join

      LOAD
        lTolRef,
        lJobRef

      FROM
      ..\..\02_Data\TOL_BOK_MI.qvd
      (qvd);


      Store TOL_NEW into ..\..\02_Data\TOL_New_MI.qvd;


      let numTables = NoOfTables();
      for i=1 to $(numTables)
      let tt = TableNAme(0);
      drop table [$(tt)];
      next

       

      ---------------------------------TAB2--------------------------------
      JOB_NEW:

      LOAD dSetQuant,
           dSetShots,
           dSetSpeed,
           iActCavity,
           iSetCavity,
           lJobRef,
           sName as Auftragsnummer,
           sType,
           tActBegin,
           tActEnd,
           tReleaseDate
          


      FROM
      ..\..\02_Data\JOB_MI.qvd
      (qvd);

      Left Join

      LOAd

        lTolRef as lTolRefArt,
           sDescript as Artikelbeschreibung,
           sName as Artikel,
           lJobRef
       
          
      From ..\..\02_Data\TOL_New_MI.qvd
      (qvd)
      Where ((lTolTypRef = 10))
      ;

      Store JOB_NEW into ..\..\02_Data\JOB_10b1_MI.qvd;

      let numTables = NoOfTables();
      for i=1 to $(numTables)
      let tt = TableNAme(0);
      drop table [$(tt)];
      next

      ---------------------------------TAB3--------------------------------
      JOB_NEW:

      LOAD dSetQuant,
           dSetShots,
           dSetSpeed,
           iActCavity,
           iSetCavity,
           lJobRef,
           Auftragsnummer,
           sType,
           tActBegin,
           tActEnd,
           tReleaseDate,
           lTolRefArt,
           Artikelbeschreibung,
           Artikel
          


      FROM
      ..\..\02_Data\JOB_10b1_MI.qvd
      (qvd);

      Left Join

      LOAd

        sDepot as Werkzeuglagerort,
           sDescript as Werkzeugbeschreibung,
           sName as Werkzeug,
           lJobRef
           //bZusatz
          
      From ..\..\02_Data\TOL_New_MI.qvd
      (qvd)
      Where ((lTolTypRef = 20))
      ;

      Store JOB_NEW into ..\..\02_Data\JOB_10b1_20_MI.qvd;

      let numTables = NoOfTables();
      for i=1 to $(numTables)
      let tt = TableNAme(0);
      drop table [$(tt)];
      next