<?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: QVD export and load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843648#M658775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Feel free to ask any questions you may have. I admit that the code is a bit condensed at first sight &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Apr 2015 14:08:04 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2015-04-16T14:08:04Z</dc:date>
    <item>
      <title>QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843642#M658761</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 need to do the following, would appreciate any ideas about the best way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Model which loads data per month. On the first run I need it to export data to qvd files per month example qvd201501.qvd, qvd201502.qvd etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the second run it should only run the current month, and export to qvd, with this exception. On the 1st of May for example it still needs to run the data for April, 2nd of May it should export for May only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the actual model for the Users, I need to automatically import the last 12 month's qvds only&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 10:32:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843642#M658761</guid>
      <dc:creator />
      <dc:date>2015-04-02T10:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843643#M658765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Andret!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you try my expamle?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sergey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let DTStart=MakeDate(2011,1,1);&lt;/P&gt;&lt;P&gt;let DTEnd=Today(1);&lt;/P&gt;&lt;P&gt;let YearStart=Year(DTStart);&lt;/P&gt;&lt;P&gt;let YearEnd=Year(DTEnd);&lt;/P&gt;&lt;P&gt;let MonthEnd=Month(DTEnd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i=YearStart to YearEnd&lt;/P&gt;&lt;P&gt;&amp;nbsp; for j=1 to 12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //documents&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set FileName=documents_$(i)_$(j).qvd;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set TableName=&lt;SPAN style="font-size: 13.3333330154419px;"&gt;documents&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (MakeDate(i,j,1)&amp;lt;=DTEnd and isnull(QvdCreateTime('$(QVDPath)\$(FileName)'))) or (i=YearEnd and j=MonthEnd) then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(TableName):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sql select &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --top 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc_date "DateTime",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dateadd(day, datediff(day, 0, doc_date), 0) "Date",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --doc_date_only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc_id "IDDocument",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc_num "NumDocument",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt_id "IDDocType",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emp_id "IdEmployee"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from documents&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where doc_date between dateadd(day,0,dateadd(month,$(j)-1,dateadd(year,$(i)-1900,0))) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and dateadd(second,59,dateadd(minute,59,dateadd(hour,23,dateadd(day,-1,dateadd(month,$(j),dateadd(year,$(i)-1900,0))))));&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE $(TableName) into $(QVDPath)\$(FileName) (qvd);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop table $(TableName);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; next j;&lt;/P&gt;&lt;P&gt;next i;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843643#M658765</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-04-02T11:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843644#M658767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks I will try, give me a few days, I will give feedback&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:57:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843644#M658767</guid>
      <dc:creator />
      <dc:date>2015-04-02T11:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843645#M658769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;// Make sure your source data is loaded as RESIDENT. Call this table SourceData with a field SD_Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// Set QVDPath to the path of source/dest QVDs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;FOR j = 0 to 11 // only cover 12 months&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; LET TableName = 'qvd$(=year(AddMonths(today(), $(j))))$(=num(Month(AddMonths(today(), $(j))), '00'))';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; IF (j = 0) OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((j = 1) AND (Day(today()) = 1)) OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(FileTime('$(QVDPath)\$(TableName).QVD')) THEN&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(TableName):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD * RESIDENT SourceData WHERE InMonth(SD_Date, today(), -$(j));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE $(TableName) INTO '$(QVDPath)\$(TableName).QVD';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table $(TableName);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; END IF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 11:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843645#M658769</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-02T11:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843646#M658771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not making sense of this personally probably this is because I still quite new to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table DEBTORHISTORY with a field HPeriod., I need the setpath as well for the QVD's and then a way to split these field into files with one &lt;SPAN style="font-size: 13.3333330154419px;"&gt;HPeriod per qvd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the path name&lt;/P&gt;&lt;P&gt;E:\Qlikview\QVDeploy\Debtor\QVD\RE0001&lt;/P&gt;&lt;P&gt;I would like to call the qvd's RE0001-"HPeriod"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the first load I want to do a complete load and create of qvd's, after that i want to let's say only create a new qvd for the current and previous month which will overwrite the old qvds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 08:07:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843646#M658771</guid>
      <dc:creator />
      <dc:date>2015-04-16T08:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843647#M658773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to get my head around this, will have a look at this again tomorrow when i have a clear head, I am starting to pick up from the two eplies,&amp;nbsp; die logic is slowly starting to make sense&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 13:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843647#M658773</guid>
      <dc:creator />
      <dc:date>2015-04-16T13:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843648#M658775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Feel free to ask any questions you may have. I admit that the code is a bit condensed at first sight &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:08:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843648#M658775</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-16T14:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843649#M658776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to do an initial load, that this stage it is unsure how far back we will go, this depends from one clients to the next. In the initial load then i need to export all the files to qvd, including the current month, then also on the first of the month I still need to run the previous months as well. So going forward from the initial load I will only be pulling in the current month's data and this then needs to overwrite the olde file created the previous day...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand it the first step like you said is setting the path, that is easy enough, after that you lose me a bit with the 12 months only, that is probably changeable. I will be getting the name of the file from Text for example RE0001 and then a hyphen with the Hperiod field which indicated=s the month for which the QVD is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why I need to load it as a resident able, is this basically to create a temporary table with only the months data which is to be exported to qvd and then you drop the tav=ble after the export, then you do to the next months etc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code itself would be a bit easier if you can explain in words&amp;nbsp; what it does&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;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;FOR j = 0 to 11 // only cover 12 months--&lt;STRONG&gt;this can then probably be changed to how many months are required&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; LET TableName = 'qvd$(=year(AddMonths(today(), $(j))))$(=num(Month(AddMonths(today(), $(j))), '00'))';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; IF (j = 0) OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((j = 1) AND (Day(today()) = 1)) OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(FileTime('$(QVDPath)\$(TableName).QVD')) THEN&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(TableName):&lt;STRONG style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 10.6666669845581px;"&gt;--This bit from my previous comment I am unsure about, not sure anout the file time or why you specifically use j-0 or 1 with the first day of the month, obviously this is for the current month or if you are on the first day of the new month, I am just not sure exactly what the code is doing&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD * RESIDENT SourceData WHERE InMonth(SD_Date, today(), -$(j));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE $(TableName) INTO '$(QVDPath)\$(TableName).QVD';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table $(TableName);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; END IF&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: 'courier new', courier;"&gt;Hope I am making sense. I really appreciate your help&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 06:04:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843649#M658776</guid>
      <dc:creator />
      <dc:date>2015-04-17T06:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843650#M658777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 07:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843650#M658777</guid>
      <dc:creator />
      <dc:date>2015-04-30T07:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843651#M658778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sergey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really like your idea, I just have a few questions. You set the dates etc fine, my question is regarding the timestamp field. I only have a YearMonth field.The in table in question we do not have a date added field as such, We have a process running which adds last months data on the first day of the new month to the source table from where we import the data, so there is not real datetime field. So for months prior to that the data is stored into qvd's on the first run, then every month on the first this model will basically create a new qvd file for the past month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We will then use the qvd files to load it into another model where we have our dashboards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you have a look at how I can change the script fot eh YearMonthField?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 08:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843651#M658778</guid>
      <dc:creator />
      <dc:date>2015-04-30T08:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843652#M658779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, been busy lately. I'll do my best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;12 months&lt;/EM&gt;&lt;/STRONG&gt;: yes you can change that. I didn't define a variable for the number of months you want to go bback because you stated that the final document will only load data from the last 12 months. Change the FOR loop start into something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;SET vNumOfMonthsToGoBack = 24; // Now we get a run for 24 (preceding) months&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;FOR j = 0 TO $(vNumOfMonthsToGoBack) - 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;File naming&lt;/EM&gt;&lt;/STRONG&gt;: the LET statement in the FOR body assigns a different name to each successive table. If I understand it correctly, you can modify the LET statement into something like. This. Note that if you want to cover more than 12 months, you should include the year as well. That's what this LET statement does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 10.6666669845581px;"&gt;LET TableName = 'RE0001-$(=year(AddMonths(today(), $(j))))$(=num(Month(AddMonths(today(), $(j))), '00'))';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Resident source data&lt;/EM&gt;&lt;/STRONG&gt;: just to make my example code simpler. The LOAD is from a central RESIDENT table that contains all data. YMMV. BTW Your assumption about how it operates is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Code comment 2:&lt;/EM&gt;&lt;/STRONG&gt; exactly, that's all there is to it. You create a QVD if one of these conditions is met:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For Current month (j = 0) =: always&lt;/LI&gt;&lt;LI&gt;For Previous month (j=1 and day = 1) = only on the first of the current month&lt;/LI&gt;&lt;LI&gt;For missing QVD = always. This is the big initial load.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 10.6666669845581px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 10.6666669845581px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 10:42:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843652#M658779</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-04-30T10:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843653#M658780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you manage to get it to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 18:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843653#M658780</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-05-08T18:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: QVD export and load</title>
      <link>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843654#M658781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will get back to you, busy with some SQL DBA stuff as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Fri, May 8, 2015 at 8:33 PM, Peter Cammaert &amp;lt;qcwebmaster@qlikview.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 10:21:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QVD-export-and-load/m-p/843654#M658781</guid>
      <dc:creator />
      <dc:date>2015-05-11T10:21:10Z</dc:date>
    </item>
  </channel>
</rss>

