<?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: Appending data to historic data using SQL selects in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Appending-data-to-historic-data-using-SQL-selects/m-p/423878#M1149957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I ended up looking into QlikView Components project and this had all the tools I needed to easily accomplish what I wanted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 May 2013 11:52:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-16T11:52:11Z</dc:date>
    <item>
      <title>Appending data to historic data using SQL selects</title>
      <link>https://community.qlik.com/t5/QlikView/Appending-data-to-historic-data-using-SQL-selects/m-p/423876#M1149955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read this usage example of how to combine data with historic data to "build up" a dataset from smaller components:&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://www.qvsource.com/wiki/Saving-Historical-Data.ashx"&gt;http://www.qvsource.com/wiki/Saving-Historical-Data.ashx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm now trying to perform the same using a database table that I load and want to store the new records from but I'm clearly messing up the syntax somehow since I'm getting the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;Table not found&lt;/P&gt;&lt;P&gt;LOAD * resident NewData&lt;/P&gt;&lt;P&gt;where not exists('SEQID', 'SEQID')&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the script below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// create a variable for the QVD name as it will be reused&lt;/P&gt;&lt;P&gt;let alldocuments = 'msg_log.qvd';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// We check the size of the QVD&lt;/P&gt;&lt;P&gt;let size = filesize('$(alldocuments)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// If the size is greater than zero then we already have (historical) data stored in it&lt;/P&gt;&lt;P&gt;// and so we should load it to the Historic table&lt;/P&gt;&lt;P&gt;// After the first time this script is executed, this should always run&lt;/P&gt;&lt;P&gt;if not isnull(size) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Historic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD * FROM '$(alldocuments)' (qvd);&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// We now make the call to QVSource and get the latest data&lt;/P&gt;&lt;P&gt;// Notice at the end that we're only adding Search_id's to the table that aren't already in it by using the 'where not exist'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=user;Initial Catalog=BT;Data Source=DSN;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=workstation;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is SDKFJLSKDJEOIFJ);&lt;/P&gt;&lt;P&gt;NewData:&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEQID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,STATUS_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,START_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,END_DATE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,STATUS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,SENDER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,RECEIVER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,FORMAT&lt;/P&gt;&lt;P&gt;FROM MSG_LOG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Now create a Data -table where we load the previously created two resident tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD * resident Historic;&lt;/P&gt;&lt;P&gt;LOAD * resident NewData&lt;/P&gt;&lt;P&gt;where not exists('SEQID', 'SEQID');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// use where not exists to only load the new records from NewData in addition to the ones previously stored in Historic &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// At this point the table includes both historical and the latest data&lt;/P&gt;&lt;P&gt;// We can now store it to the QVD, ready to be reloaded next time the script is run&lt;/P&gt;&lt;P&gt;STORE Data INTO '$(alldocuments)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 11:50:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Appending-data-to-historic-data-using-SQL-selects/m-p/423876#M1149955</guid>
      <dc:creator />
      <dc:date>2013-05-03T11:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Appending data to historic data using SQL selects</title>
      <link>https://community.qlik.com/t5/QlikView/Appending-data-to-historic-data-using-SQL-selects/m-p/423877#M1149956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see here&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/313830"&gt;http://community.qlik.com/message/313830&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;See &lt;/SPAN&gt;&lt;A class="jive-link-thread-small" href="http://qliktech-public.hosted.jivesoftware.com/thread/53555" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; color: #3778c7;"&gt;here&lt;/A&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;, &lt;/SPAN&gt;&lt;A class="jive-link-thread-small" href="http://qliktech-public.hosted.jivesoftware.com/thread/45573" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; color: #3778c7;"&gt;here&lt;/A&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt; and &lt;/SPAN&gt;&lt;A class="jive-link-thread-small" href="http://qliktech-public.hosted.jivesoftware.com/thread/57924" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; color: #3778c7;"&gt;here&lt;/A&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt; for more information.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/thread/53555"&gt;http://community.qlik.com/thread/53555&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;and this one&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://qlikviewnotes.blogspot.nl/2012/01/incremental-load-using-qlikview.html" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7; background-color: #ffffff;"&gt;Rob's blog post on incremental loading&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2013 12:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Appending-data-to-historic-data-using-SQL-selects/m-p/423877#M1149956</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-05-03T12:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Appending data to historic data using SQL selects</title>
      <link>https://community.qlik.com/t5/QlikView/Appending-data-to-historic-data-using-SQL-selects/m-p/423878#M1149957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I ended up looking into QlikView Components project and this had all the tools I needed to easily accomplish what I wanted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 11:52:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Appending-data-to-historic-data-using-SQL-selects/m-p/423878#M1149957</guid>
      <dc:creator />
      <dc:date>2013-05-16T11:52:11Z</dc:date>
    </item>
  </channel>
</rss>

