0 Replies Latest reply: Apr 16, 2013 6:41 AM by Onur Civelek RSS

    for each question

      Hi,

       

      i have the following script...   The Codeblock are repaeted. How can I write the code to the For each loop shorter or more elegant ?

       

      Thank you for advice.

       

      Best Regards,

       

      TEMP_PICKER_SITES:

          LOAD Distinct FilePath() AS FileName,

               FileTime() AS DateFile

          FROM D:\Qlikview11\Tools\APITool_v3_Qlikview\reports\28781_20*.csv;  //Systemanomalie ?!

          INNER JOIN (TEMP_PICKER_SITES) LOAD max(DateFile) as DateFile RESIDENT TEMP_PICKER_SITES;

          LET FileNameOfSites = peek('FileName',-1);

          DROP TABLE TEMP_PICKER_SITES;

         

      TEMP_PICKER_CAMPAIGN:

          LOAD Distinct FilePath() AS FileName,

               FileTime() AS DateFile

          FROM D:\Qlikview11\Tools\APITool_v3_Qlikview\reports\28779_20*.csv;

          INNER JOIN (TEMP_PICKER_CAMPAIGN) LOAD max(DateFile) as DateFile RESIDENT TEMP_PICKER_CAMPAIGN;

          LET FileNameOfCampaign = peek('FileName',-1);

          DROP TABLE TEMP_PICKER_CAMPAIGN;

         

      TEMP_PICKER_CAMPAIGNEXT:

          LOAD Distinct FilePath() AS FileName,

               FileTime() AS DateFile

          FROM D:\Qlikview11\Tools\APITool_v3_Qlikview\reports\111573_201*.csv;

          INNER JOIN (TEMP_PICKER_CAMPAIGNEXT) LOAD max(DateFile) as DateFile RESIDENT TEMP_PICKER_CAMPAIGNEXT;

          LET FileNameOfCampaignExt = peek('FileName',-1);

          DROP TABLE TEMP_PICKER_CAMPAIGNEXT;