<?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: Re: Copy Old Table in Load Script... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582120#M683608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm getting a table does not exist error on #1 during the load.&amp;nbsp; I'm attached my entire load script here.&amp;nbsp; The only other thing I can assume you mean is to keep the actual QVD files around and load them.&amp;nbsp; Any insights would be great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Feb 2014 16:58:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-28T16:58:02Z</dc:date>
    <item>
      <title>Copy Old Table in Load Script...</title>
      <link>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582118#M683606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a QVW file that loads CSV's and outputs QVD files.&amp;nbsp; Before the QVD is moved to our live server I have a team that is supposed to analyze the data.&amp;nbsp; What I would like to do is give them the ability to see before and after.&amp;nbsp; My thought is on refresh I'd copy the previously load table into a "previous_week" table and then drop the current table, then reload the new CSV file.&amp;nbsp; So something like this (in non-Qlikview syntax)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE previous_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COPY TABLE current_week TO previous_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE current_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;current_week;&lt;/P&gt;&lt;P&gt;Load * from new_week_data.csv;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on how to make this work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 00:21:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582118#M683606</guid>
      <dc:creator />
      <dc:date>2014-02-28T00:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Old Table in Load Script...</title>
      <link>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582119#M683607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do something like this. Keep two copies in QVD for your table with both data states. One Previous_week.QVD and one&amp;nbsp; Current_week.QVD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Override Previuos_week with the Current_week data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Override existing Current_week.qvd with the load from CSV data updated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Load both QVD in data model and mantein unlinked two tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;Previuos_week:&lt;/P&gt;&lt;P&gt;Load * FROM Current_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE Previuos_week INTO Previuos_week.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Previuos_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)&lt;/P&gt;&lt;P&gt;Current_week:&lt;/P&gt;&lt;P&gt;Load * FROM &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;new_week_data.csv;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE Current_week INTO Current_week.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Current_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)&lt;/P&gt;&lt;P&gt;And then load both QVD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current_week:&lt;/P&gt;&lt;P&gt;Load * FROM Current_week.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qualify *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous_week:&lt;/P&gt;&lt;P&gt;Load * FROM Previous_week.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qualify and Unqualify functions are for add as name of each field the name of your table, it allow mantein the tables not linked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt; You can also maintain both tables linked by the primary key and load twice this primary key with another name in each table to can test data more directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current_week:&lt;/P&gt;&lt;P&gt;Load *, PrimaryKey as Current_week.PrimaryKey FROM Current_week.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qualify *;&lt;/P&gt;&lt;P&gt;Unqualify PrimaryKey;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous_week:&lt;/P&gt;&lt;P&gt;Load *, PrimaryKey as Previous_week.PrimaryKey FROM Previous_week.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tell me if your have any question.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 00:52:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582119#M683607</guid>
      <dc:creator />
      <dc:date>2014-02-28T00:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Copy Old Table in Load Script...</title>
      <link>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582120#M683608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm getting a table does not exist error on #1 during the load.&amp;nbsp; I'm attached my entire load script here.&amp;nbsp; The only other thing I can assume you mean is to keep the actual QVD files around and load them.&amp;nbsp; Any insights would be great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 16:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582120#M683608</guid>
      <dc:creator />
      <dc:date>2014-02-28T16:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Old Table in Load Script...</title>
      <link>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582121#M683609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Michael,&lt;/P&gt;&lt;P&gt;If I understood correctly you want to compare previous qvd with the current qvd data before the previous one gets over-written by the current one.&lt;/P&gt;&lt;P&gt;In that case you can just add timestamp to the qvds like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vDate= date(today(),'YYYYMMDD');&lt;/P&gt;&lt;P&gt;Store Test into Test_$(vDate).qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will suffix a timestamp to the qvd and will clearly tell you when the file was run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To read the latest one do the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vDate= date(today(),'YYYYMMDD');&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;From Test_$(vDate).qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 17:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582121#M683609</guid>
      <dc:creator />
      <dc:date>2014-02-28T17:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Old Table in Load Script...</title>
      <link>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582122#M683610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay in my answer but I was hard at work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Ajay suggestion is a good idea for avoid loads not necessaries, but I explain that I wrote previously, perhaps is more easy, I dont know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, think that create two QVDs files, one for new information and one for previous information.&lt;/P&gt;&lt;P&gt;So, if ever you only have a CSV file with the new information, at the first time you should create the both QVDs with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DATA:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * FROM &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;new_week_data.csv&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DATA&lt;/SPAN&gt; INTO Previuos_week.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;STORE &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; INTO Current_week.qvd;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;drop table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;DATA&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else, if you have two CSV files, one with new information and other with previous information, at the first time you should create the both QVDs with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Previuos_week:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * FROM previous&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;_week_data.csv;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE Previuos_week INTO Previuos_week.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;drop table Previuos_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Current_week:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * FROM &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;new_week_data.csv&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE Current_week INTO Current_week.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;drop table Current_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, for the next reloads, you can do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Previuos_week:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * FROM Current_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE Previuos_week INTO Previuos_week.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;drop table Previuos_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Current_week:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * FROM &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;new_week_data.csv;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;STORE Current_week INTO Current_week.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;drop table Current_week;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point you have the two QVDs file finished, one with the previous information, and other with new information.&lt;/P&gt;&lt;P&gt;So we load these QVD to compare:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Current_week:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load *, PrimaryKey as Current_week.PrimaryKey FROM Current_week.qvd;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Qualify *;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Unqualify PrimaryKey;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Previous_week:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load *, PrimaryKey as Previous_week.PrimaryKey FROM Previous_week.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Unqualify *;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want you can post your qvw and CSVs and I'll help you with pleasure.&lt;/P&gt;&lt;P&gt;I hope I have helped and with the begin of my post you will can solve your issue.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Mar 2014 01:51:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Copy-Old-Table-in-Load-Script/m-p/582122#M683610</guid>
      <dc:creator />
      <dc:date>2014-03-01T01:51:21Z</dc:date>
    </item>
  </channel>
</rss>

