<?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 Incremental load query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incremental-load-query/m-p/77702#M12814</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me understand if below logic is for insert only or insert and update?what this logic is doing?I am struggling to understand this logic.Please help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each v_File in FileList('$(FicSRC_ExportQueries_4)*_RSS_EXP_QUERY_4_*.csv');&lt;/P&gt;&lt;P&gt;Let v_File_HoroDate = left(TextBetween('$(v_File)','_RSS_EXP_QUERY_4_','.csv'),8);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF (isNull(qvdCreateTime('$(RootDir_FACT)RSS_RETURN_CANCELATION_QUERY_4_$(v_File_HoroDate).qvd'))) THEN&lt;/P&gt;&lt;P&gt;// Si il n'existe pas on ajoute la date dans la list à traiter&lt;/P&gt;&lt;P&gt;List_RSS_RETURN_CANCELATION_QUERY_Date_To_Build:&lt;/P&gt;&lt;P&gt;LOAD '$(v_File_HoroDate)' as RSS_RETURN_CANCELATION_QUERY_Date_To_Build&lt;/P&gt;&lt;P&gt;AutoGenerate 1;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;NEXT v_File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let a = NoOfRows('List_RSS_RETURN_CANCELATION_QUERY_Date_To_Build');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let l_Date_idx=1;&lt;/P&gt;&lt;P&gt;Do while len(fieldvalue('RSS_RETURN_CANCELATION_QUERY_Date_To_Build',l_Date_idx))&lt;/P&gt;&lt;P&gt;let l_Date=fieldvalue('RSS_RETURN_CANCELATION_QUERY_Date_To_Build',l_Date_idx);&lt;/P&gt;&lt;P&gt;TRACE $(l_Date);&lt;/P&gt;&lt;P&gt;RSS_RETURN_CANCELATION_QUERY:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;ID As [ID], &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORTING_UNIT, &lt;/P&gt;&lt;P&gt;STATUS, &lt;/P&gt;&lt;P&gt;REQUEST_TYPE, &lt;/P&gt;&lt;P&gt;REQUESTER_NAME, &lt;/P&gt;&lt;P&gt;CANCELATION_REASON as CANCELATION_REASON_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;/P&gt;&lt;P&gt;[$(FicSRC_ExportQueries_4)*RSS_EXP_QUERY_4_*$(l_Date)*.csv]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ';', no quotes);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE RSS_RETURN_CANCELATION_QUERY into '$(RootDir_FACT)RSS_RETURN_CANCELATION_QUERY_4_$(l_Date).qvd';&lt;/P&gt;&lt;P&gt;DROP Table RSS_RETURN_CANCELATION_QUERY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let l_Date_idx=l_Date_idx+1; &lt;/P&gt;&lt;P&gt;LOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// On test si le QVD Global existe &lt;/P&gt;&lt;P&gt;IF (Not isNull(qvdCreateTime('$(RootDir_QLIKMART)RSS_RETURN_CANCELATION_QUERY_4.qvd'))) THEN&lt;/P&gt;&lt;P&gt;Let l_test = 'Not IsNull($(a))';&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Let l_test = '1=1';&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;P&gt;IF $(l_test) THEN&lt;/P&gt;&lt;P&gt;// On concataine tous les QVD FIRSTDATE en supprimant les doublons&lt;/P&gt;&lt;P&gt;RSS_RETURN_CANCELATION_QUERY_ALL:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;From '$(v_DestinationPath)RSS_RETURN_CANCELATION_QUERY_4_*.qvd' (qvd)&lt;/P&gt;&lt;P&gt;Where not Exists([ID]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE RSS_RETURN_CANCELATION_QUERY_ALL into $(RootDir_QLIKMART)RSS_RETURN_CANCELATION_QUERY_4.qvd;&lt;/P&gt;&lt;P&gt;DROP Table RSS_RETURN_CANCELATION_QUERY_ALL;&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 May 2018 06:52:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-23T06:52:21Z</dc:date>
    <item>
      <title>Incremental load query</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-load-query/m-p/77702#M12814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me understand if below logic is for insert only or insert and update?what this logic is doing?I am struggling to understand this logic.Please help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each v_File in FileList('$(FicSRC_ExportQueries_4)*_RSS_EXP_QUERY_4_*.csv');&lt;/P&gt;&lt;P&gt;Let v_File_HoroDate = left(TextBetween('$(v_File)','_RSS_EXP_QUERY_4_','.csv'),8);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF (isNull(qvdCreateTime('$(RootDir_FACT)RSS_RETURN_CANCELATION_QUERY_4_$(v_File_HoroDate).qvd'))) THEN&lt;/P&gt;&lt;P&gt;// Si il n'existe pas on ajoute la date dans la list à traiter&lt;/P&gt;&lt;P&gt;List_RSS_RETURN_CANCELATION_QUERY_Date_To_Build:&lt;/P&gt;&lt;P&gt;LOAD '$(v_File_HoroDate)' as RSS_RETURN_CANCELATION_QUERY_Date_To_Build&lt;/P&gt;&lt;P&gt;AutoGenerate 1;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;NEXT v_File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let a = NoOfRows('List_RSS_RETURN_CANCELATION_QUERY_Date_To_Build');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let l_Date_idx=1;&lt;/P&gt;&lt;P&gt;Do while len(fieldvalue('RSS_RETURN_CANCELATION_QUERY_Date_To_Build',l_Date_idx))&lt;/P&gt;&lt;P&gt;let l_Date=fieldvalue('RSS_RETURN_CANCELATION_QUERY_Date_To_Build',l_Date_idx);&lt;/P&gt;&lt;P&gt;TRACE $(l_Date);&lt;/P&gt;&lt;P&gt;RSS_RETURN_CANCELATION_QUERY:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;ID As [ID], &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORTING_UNIT, &lt;/P&gt;&lt;P&gt;STATUS, &lt;/P&gt;&lt;P&gt;REQUEST_TYPE, &lt;/P&gt;&lt;P&gt;REQUESTER_NAME, &lt;/P&gt;&lt;P&gt;CANCELATION_REASON as CANCELATION_REASON_ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM&lt;/P&gt;&lt;P&gt;[$(FicSRC_ExportQueries_4)*RSS_EXP_QUERY_4_*$(l_Date)*.csv]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is ';', no quotes);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE RSS_RETURN_CANCELATION_QUERY into '$(RootDir_FACT)RSS_RETURN_CANCELATION_QUERY_4_$(l_Date).qvd';&lt;/P&gt;&lt;P&gt;DROP Table RSS_RETURN_CANCELATION_QUERY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let l_Date_idx=l_Date_idx+1; &lt;/P&gt;&lt;P&gt;LOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// On test si le QVD Global existe &lt;/P&gt;&lt;P&gt;IF (Not isNull(qvdCreateTime('$(RootDir_QLIKMART)RSS_RETURN_CANCELATION_QUERY_4.qvd'))) THEN&lt;/P&gt;&lt;P&gt;Let l_test = 'Not IsNull($(a))';&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;Let l_test = '1=1';&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;P&gt;IF $(l_test) THEN&lt;/P&gt;&lt;P&gt;// On concataine tous les QVD FIRSTDATE en supprimant les doublons&lt;/P&gt;&lt;P&gt;RSS_RETURN_CANCELATION_QUERY_ALL:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;From '$(v_DestinationPath)RSS_RETURN_CANCELATION_QUERY_4_*.qvd' (qvd)&lt;/P&gt;&lt;P&gt;Where not Exists([ID]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE RSS_RETURN_CANCELATION_QUERY_ALL into $(RootDir_QLIKMART)RSS_RETURN_CANCELATION_QUERY_4.qvd;&lt;/P&gt;&lt;P&gt;DROP Table RSS_RETURN_CANCELATION_QUERY_ALL;&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 06:52:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-load-query/m-p/77702#M12814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-23T06:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Incremental load query</title>
      <link>https://community.qlik.com/t5/QlikView/Incremental-load-query/m-p/77703#M12815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It loads several CSV files from a folder and stores them into QVD files, then loads from the QVDs those for which the field ID has not been already loaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would recommend you to use EXIT SCRIPT; after each block of code so you can see, step by step and without breaking anything, how the script works and what it does. Debugging and clicking on Step instead of Run also helps to see the values of the variables and how each instruction is called.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 07:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incremental-load-query/m-p/77703#M12815</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2018-05-23T07:07:53Z</dc:date>
    </item>
  </channel>
</rss>

