<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: incremental load based on the file name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162075#M905916</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raphael,&lt;/P&gt;&lt;P&gt;This script compares the filetime of the txt files with the latest date on a qvd to decide if the txt file's data is loaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all load the data from your qvd then run a piece of script like this:&lt;/P&gt;&lt;P&gt;TempMaxDate:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Max (Due Date)as MaxDate From&lt;/P&gt;&lt;P&gt;Data.qvd&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let &lt;SPAN style="font-size: 13.3333px;"&gt;vMaxQVDdate&lt;/SPAN&gt; = Peek('MaxDate',0,'TempMaxDate');&lt;/P&gt;&lt;P&gt;Drop table TempMaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will place the value of the largest date on your qvd into the variable &lt;SPAN style="font-size: 13.3333px;"&gt;vMaxQVDdate&lt;/SPAN&gt;. You can use this variable to choose the txt files to load. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each file in FileList('nc_nc_*.TXT') \\You will need to include the path to your files here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vFileDate = Floor(FileTime('$(file)'));&lt;/P&gt;&lt;P&gt;if&amp;nbsp; Floor(FileTime('$(file)')) &amp;gt; $(vMaxQVDdate) then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Field1,&lt;/P&gt;&lt;P&gt;Field2,&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(file)]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, no labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END If;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your qvd and your txt files have the same fields then the data from the txt files will automatically concatenate with the data from your qvd. If not you'll need a little more scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you STORE the data to a new qvd file overwriting the existing one a reload will not add any more data to that on the new qvd unless a new txt file is added to your txt file folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Jul 2016 18:59:27 GMT</pubDate>
    <dc:creator>effinty2112</dc:creator>
    <dc:date>2016-07-02T18:59:27Z</dc:date>
    <item>
      <title>incremental load based on the file name</title>
      <link>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162071#M905912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;Folks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;I'm still learning the QlikView ... I googled but could not write code that works for incremental load based on the file name. Let me explain. I want to make daily load the raw data received (.txt) to QVD files incrementally. These files are named according to the type of document and the last date of the records contained therein. The following exemplary relationship. Could anyone help? Thank you very much in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;Rafael.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160222.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160223.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160224.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160225.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160226.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160229.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160301.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160302.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160303.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160304.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160307.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160308.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160309.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160310.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160311.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160314.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160315.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160316.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160317.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160318.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160321.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160322.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12pt; font-family: 'Times New Roman', serif; color: #000000;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Calibri, sans-serif;"&gt;nc_nc_20160323.TXT&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162071#M905912</guid>
      <dc:creator>rafael_gerhardt</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: incremental load based on the file name</title>
      <link>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162072#M905913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;chk dis&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9531"&gt;Incremental Load in Qlikview - Sources&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 16:56:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162072#M905913</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2016-07-02T16:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: incremental load based on the file name</title>
      <link>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162073#M905914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14674804589397180" jivemacro_uid="_14674804589397180"&gt;
&lt;P&gt;Data:&lt;/P&gt;
&lt;P&gt;LOAD Customer,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Sales Order ID],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShipDate as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(ShipDate) as Month,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUm( Month(ShipDate)) as MonthNum,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quantity&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;[Sales Orders*.xls]&lt;/P&gt;
&lt;P&gt;(biff, embedded labels, table is [Sales Orders$])where Date(filetime(), 'DD/MM/YYYY') &amp;gt;= today();&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be helpful for you. If you want to pick the file based on current date and time of reload if it happen on daily basis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please elaborate your Requirement,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA,&lt;/P&gt;&lt;P&gt;Hirish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 17:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162073#M905914</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2016-07-02T17:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: incremental load based on the file name</title>
      <link>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162074#M905915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm assuming you have still not created a QVD from your existing text files so lets create that first&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For each TABLEFILE in filelist ('your_full_directory_path_here\*.TXT')&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ALL_DATA:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(TABLEFILE)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Next TABLEFILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Store Table ALL_DATA&amp;nbsp; in fullpath\QVDNAME.QVD;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Now we have a QVD to append to; so from next day onward run the below script.(Adding to Bottom of table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;let vFilename&amp;nbsp; = 'nc_nc_' &amp;amp; DATE(now(),'YYYYMMDD') &amp;amp; '.TXT';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;ALL_DATA&lt;/SPAN&gt;:&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;fullpath\QVDNAME.QVD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;(QVD);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CONCATENATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DailyData:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fiel1,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'you_full_path_here\'$(vFilename)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 17:48:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162074#M905915</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2016-07-02T17:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: incremental load based on the file name</title>
      <link>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162075#M905916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raphael,&lt;/P&gt;&lt;P&gt;This script compares the filetime of the txt files with the latest date on a qvd to decide if the txt file's data is loaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all load the data from your qvd then run a piece of script like this:&lt;/P&gt;&lt;P&gt;TempMaxDate:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Max (Due Date)as MaxDate From&lt;/P&gt;&lt;P&gt;Data.qvd&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let &lt;SPAN style="font-size: 13.3333px;"&gt;vMaxQVDdate&lt;/SPAN&gt; = Peek('MaxDate',0,'TempMaxDate');&lt;/P&gt;&lt;P&gt;Drop table TempMaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will place the value of the largest date on your qvd into the variable &lt;SPAN style="font-size: 13.3333px;"&gt;vMaxQVDdate&lt;/SPAN&gt;. You can use this variable to choose the txt files to load. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each file in FileList('nc_nc_*.TXT') \\You will need to include the path to your files here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vFileDate = Floor(FileTime('$(file)'));&lt;/P&gt;&lt;P&gt;if&amp;nbsp; Floor(FileTime('$(file)')) &amp;gt; $(vMaxQVDdate) then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Field1,&lt;/P&gt;&lt;P&gt;Field2,&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[$(file)]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, no labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END If;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your qvd and your txt files have the same fields then the data from the txt files will automatically concatenate with the data from your qvd. If not you'll need a little more scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you STORE the data to a new qvd file overwriting the existing one a reload will not add any more data to that on the new qvd unless a new txt file is added to your txt file folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 18:59:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162075#M905916</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2016-07-02T18:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: incremental load based on the file name</title>
      <link>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162076#M905917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THATS GREAT!!! Tks&lt;/P&gt;&lt;P&gt;here are de final script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// first create QVD&lt;/P&gt;&lt;P&gt; Directory;&lt;/P&gt;&lt;P&gt; NC_dados_STA:&lt;/P&gt;&lt;P&gt; LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; date#([@20:27],'yyyyMMdd') as DataLinha,&lt;/P&gt;&lt;P&gt;&amp;nbsp; [@1:n] as DadosTexto&lt;/P&gt;&lt;P&gt; FROM&lt;/P&gt;&lt;P&gt; [..\..\nc_nc_20160222.TXT]&lt;/P&gt;&lt;P&gt; (fix, codepage is 1252, no labels);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;store NC_dados_STA into [..\..\NC_dados_STA.qvd] (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// after load the data from your qvd...&lt;/P&gt;&lt;P&gt;NC_dados_STA:&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;LOAD DataLinha, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DadosTexto&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\..\NC_dados_STA.qvd]&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//... then create a var max date&lt;/P&gt;&lt;P&gt;TempMaxDate:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Max (DataLinha) as MaxDate&lt;/P&gt;&lt;P&gt;From [..\..\Projeto Monitoramento COF\Dados DPF\NC\Extrações\NC_dados_STA.qvd] (qvd);&lt;/P&gt;&lt;P&gt;Let vMaxQVDdate = DATE(Peek('MaxDate',0,'TempMaxDate'),'YYYYMMDD');&lt;/P&gt;&lt;P&gt;Drop table TempMaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// load the next files...&lt;/P&gt;&lt;P&gt;For Each File in FileList('..\..\Projeto Monitoramento COF\Dados DPF\NC\Extrações\nc_nc_*.TXT')&lt;/P&gt;&lt;P&gt;&amp;nbsp; Let vFileDate = date#(right(Subfield(Subfield('$(File)', '\', SubstringCount('$(File)', '\') + 1), '.', 1),8),'YYYYMMDD');&lt;/P&gt;&lt;P&gt;&amp;nbsp; if DATE($(vFileDate)) &amp;gt; DATE($(vMaxQVDdate)) then&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; date#([@20:27],'yyyyMMdd') as DataLinha,&lt;/P&gt;&lt;P&gt;&amp;nbsp; [@1:n] as DadosTexto&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM [$(File)] (fix, codepage is 1252, no labels);&lt;/P&gt;&lt;P&gt;&amp;nbsp; END If;&lt;/P&gt;&lt;P&gt;next File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// store the complete database&lt;/P&gt;&lt;P&gt;store NC_dados_STA into [..\..\NC_dados_STA.qvd] (qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2016 23:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/incremental-load-based-on-the-file-name/m-p/1162076#M905917</guid>
      <dc:creator>rafael_gerhardt</dc:creator>
      <dc:date>2016-07-02T23:53:08Z</dc:date>
    </item>
  </channel>
</rss>

