<?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 Empty Multiple QVDs in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144281#M896331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a folder with the following files:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;General_Accounts_1.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;General_&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;Accounts_2.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Specific_Accounts_3.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Specific_Accounts&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;_4.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Summary.qvd&lt;/P&gt;&lt;P&gt;Work.qvd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is to empty all files in bold (Starting with &lt;STRONG&gt;General_Accounts_*&lt;/STRONG&gt; and &lt;STRONG&gt;Specific_Accounts_*&lt;/STRONG&gt;) by script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to do that to initialize the files with 0 kb because then I have to run a process that stores the data I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how to do that? (Please, I don't need macros or CMD commands)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>microwin88x</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Empty Multiple QVDs</title>
      <link>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144281#M896331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a folder with the following files:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;General_Accounts_1.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;General_&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;Accounts_2.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Specific_Accounts_3.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Specific_Accounts&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;_4.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Summary.qvd&lt;/P&gt;&lt;P&gt;Work.qvd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is to empty all files in bold (Starting with &lt;STRONG&gt;General_Accounts_*&lt;/STRONG&gt; and &lt;STRONG&gt;Specific_Accounts_*&lt;/STRONG&gt;) by script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to do that to initialize the files with 0 kb because then I have to run a process that stores the data I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how to do that? (Please, I don't need macros or CMD commands)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!!&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/Empty-Multiple-QVDs/m-p/1144281#M896331</guid>
      <dc:creator>microwin88x</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Multiple QVDs</title>
      <link>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144282#M896332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;look at the last approach here&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.qlikblog.at/929/qliktip-30/" title="http://www.qlikblog.at/929/qliktip-30/"&gt;QlikTip #30: How to delete existing QVD files via load-script&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Aug 2016 20:33:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144282#M896332</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-08-07T20:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Multiple QVDs</title>
      <link>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144283#M896333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if I understand your question. When you run the process the qvd will get over written automatically.&lt;/P&gt;&lt;P&gt;So for example when you run the script for the first time a file &lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;General_Accounts_1.qvd&lt;/STRONG&gt;&lt;/SPAN&gt; is generated. When you run the script second time, the existing qvd file &lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;General_Accounts_1.qvd&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp; is over written.&lt;/P&gt;&lt;P&gt;Hope this helps. If not can you please be little specific.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Aug 2016 20:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144283#M896333</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-08-07T20:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Multiple QVDs</title>
      <link>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144284#M896334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the problem is that I have a process where I generate multiple QVDs, for example: General_Accounts_1, General_Accounts_2, General_Accounts_3, etcetera. And it can change from time to time. The first run I could get 5 files, the second run maybe one only 3. So I need to make sure to delete the content from all because I don't want to read data from a previous run (because then I use LOAD FROM General_Accounts_* and if I do that on the second run I'd be reading data from files 4 and 5). If I empty all at the beginning I make sure I read only the needed data...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Aug 2016 20:46:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144284#M896334</guid>
      <dc:creator>microwin88x</dc:creator>
      <dc:date>2016-08-07T20:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Multiple QVDs</title>
      <link>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144285#M896335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't get it to work on my script &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; I get an error on line 62: &lt;CODE class="keyword" style="margin: 0 !important; padding: 0 !important; font-size: 0.99em !important; font-weight: bold !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #006699 !important; background-color: #f8f8f8; background-position: initial !important;"&gt;WHERE&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13.0489px; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;CODE class="functions" style="margin: 0 !important; padding: 0 !important; font-size: 0.99em !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: #ff1493 !important; background-color: #f8f8f8; background-position: initial !important;"&gt;Exists&lt;/CODE&gt;&lt;CODE class="plain" style="color: #000000; margin: 0 !important; padding: 0 !important; font-size: 0.99em !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-color: #f8f8f8; background-position: initial !important;"&gt;(Dim1)&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Aug 2016 21:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144285#M896335</guid>
      <dc:creator>microwin88x</dc:creator>
      <dc:date>2016-08-07T21:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Multiple QVDs</title>
      <link>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144286#M896336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see the attachement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed 1 line in the sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;WHERE 0=1 //Exists(Dim1)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Aug 2016 21:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144286#M896336</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-08-07T21:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Multiple QVDs</title>
      <link>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144287#M896337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok got it. Give a try on the below code. I am also attaching a sample app for you to play around.&lt;/P&gt;&lt;P&gt;What this app does is:&lt;/P&gt;&lt;P&gt;1) First it will empty all the QVD's in a sub folder&lt;/P&gt;&lt;P&gt;2) Then it creates two QVDs in the sub folder.&lt;/P&gt;&lt;P&gt;Hope this helps....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB EmptyQVDFiles (Path)&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Check file exists&lt;/P&gt;&lt;P&gt;For each File in Filelist ('$(Path)')&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF (NOT isNull(qvdCreateTime('$(File)'))) THEN &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Check if QVD is already empty&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF (qvdNoOfRecords('$(File)') &amp;gt; 0) THEN &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Load the table structure from the existing QVD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //using Where clause which returns no records&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table_Structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&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; *&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM '$(File)' (qvd)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE 1&amp;lt;&amp;gt;1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Store table Structure back into QVD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE Table_Structure INTO '$(File)' (qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE Table_Structure;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;Next File&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Aug 2016 21:45:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Empty-Multiple-QVDs/m-p/1144287#M896337</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-08-07T21:45:36Z</dc:date>
    </item>
  </channel>
</rss>

