<?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: Command to check if a QVD file exists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168243#M713652</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;When I use the following statement it works fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vListQVDExistsProjectactuals&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NOT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;isnull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;QVDCreateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('D:\Data\123_Projectactuals.qvd'));&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;IF&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vListQVDExistsProjectactuals)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;THEN ..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However there are multiple files ending with &lt;SPAN style="font-size: 8pt;"&gt;Projectactuals, &lt;SPAN style="font-size: 10pt;"&gt;like 456_Projectactuals etc.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I want to check if a file ending with *_Projectfiles exist. How do I do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried&amp;nbsp; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vListQVDExistsProjectactuals&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NOT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;isnull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;QVDCreateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('D:\Data\*_Projectactuals.qvd'));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;but that doesn't work as the variable probably wants to have 1 unique file name.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2014 22:40:55 GMT</pubDate>
    <dc:creator>heij1421</dc:creator>
    <dc:date>2014-12-17T22:40:55Z</dc:date>
    <item>
      <title>Command to check if a QVD file exists</title>
      <link>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168238#M713646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My QVD files holding transactions are stored per year to be able to select data sets more easily in our QV applications.&lt;/P&gt;&lt;P&gt;I want to perform an incremental reload on my transaction data. This is a sequential file holding a record number but highest written record number is not necessarily in the highest year.&lt;/P&gt;&lt;P&gt;I have a transactions_2010.qvd, transactions_2009.qvd&lt;/P&gt;&lt;P&gt;When performing the reload (in a loop for x number of years), I first load the data from the existing QVD file, calculate the highest record number found in the QVD file and then load the data from the transaction file for the apprioprate year and only records &amp;gt; highest record number in the QVD file.&lt;/P&gt;&lt;P&gt;This works very good and boosts reload times.&lt;/P&gt;&lt;P&gt;However, if the QVD file does not exist yet, the script fails as the read from the QVD file ends up in error (file not found).&lt;/P&gt;&lt;P&gt;Is there a way in QV to check if the QVD file exists ? If it does not exist for the given year, I would perform a full load for the given year.&lt;/P&gt;&lt;P&gt;So my script would be like :&lt;/P&gt;&lt;P&gt;If '$(vInputIncremental)' = 'yes' then&lt;/P&gt;&lt;P&gt;transactions:&lt;BR /&gt; LOAD&lt;BR /&gt; *&lt;BR /&gt; FROM&lt;BR /&gt; transactions_$(vYear).qvd (qvd);&lt;/P&gt;&lt;P&gt;tt_max_record_number:&lt;BR /&gt; LOAD&lt;BR /&gt; max(record_number) as record_number_max&lt;BR /&gt; RESIDENT transactions;&lt;BR /&gt;&lt;BR /&gt; let vLastrecord = peek('record_number_max', 0);&lt;BR /&gt; DROP TABLE tt_max_record_number;&lt;BR /&gt;&lt;BR /&gt; else&lt;BR /&gt;&lt;BR /&gt; let vLastrecord = 0; // If no incremental reload, all records need to be read = PSRRNO &amp;gt; 0&lt;BR /&gt;&lt;BR /&gt; end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * ;&lt;/P&gt;&lt;P&gt;SQL SELECT... ;&lt;/P&gt;&lt;P&gt;The first condition 'If '$(vInputIncremental)' = 'yes' then' should be expanded with 'and transactions_$(vYear).qvd exists' but how do you write this in QV ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 17:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168238#M713646</guid>
      <dc:creator />
      <dc:date>2010-05-27T17:08:39Z</dc:date>
    </item>
    <item>
      <title>Command to check if a QVD file exists</title>
      <link>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168239#M713647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;try QvdCreateTime function.&lt;BR /&gt;If file don't exists, returns NULL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 17:15:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168239#M713647</guid>
      <dc:creator />
      <dc:date>2010-05-27T17:15:47Z</dc:date>
    </item>
    <item>
      <title>Command to check if a QVD file exists</title>
      <link>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168240#M713649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot. I tried to integrate it, but I get an error message on the following script line (I already translated my variables to make it more readible) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If 'yes' = 'yes' and not(isnull(qvdcreatetime(..\QVD\Accounting\general_ledger_A1_2010.qvd))) then&lt;/P&gt;&lt;P&gt;The '..\QVD\Accounting\' comes from a variable that is read from an 'include' file that holds the location of our different QVD files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error message says :&lt;/P&gt;&lt;P&gt;Error in expression:&lt;BR /&gt;')' expected&lt;BR /&gt;If 'yes' = 'yes' and not(isnull(qvdcreatetime(..\QVD\Accounting\general_ledger_A1_2010.qvd))) then&lt;/P&gt;&lt;P&gt;When we load data from our QVD files, the same relative path name is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An alternative script line ends up with the same error message (I have left the variable in the expression, but same translation is used as above :&lt;/P&gt;&lt;P&gt;If isnull(qvdcreatetime($(accountingdir)general_ledger_$(vASW_Company)_$(vYear).qvd)) = 0 then&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 13:58:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168240#M713649</guid>
      <dc:creator />
      <dc:date>2010-05-28T13:58:39Z</dc:date>
    </item>
    <item>
      <title>Command to check if a QVD file exists</title>
      <link>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168241#M713650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;use&lt;BR /&gt;qvdcreatetime('$(accountingdir)general_ledger_$(vASW_Company)_$(vYear).qvd')&lt;BR /&gt;instead of&lt;BR /&gt;qvdcreatetime($(accountingdir)general_ledger_$(vASW_Company)_$(vYear).qvd)&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 14:38:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168241#M713650</guid>
      <dc:creator />
      <dc:date>2010-05-28T14:38:56Z</dc:date>
    </item>
    <item>
      <title>Command to check if a QVD file exists</title>
      <link>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168242#M713651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot. That happened to do the trick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 15:46:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168242#M713651</guid>
      <dc:creator />
      <dc:date>2010-05-28T15:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Command to check if a QVD file exists</title>
      <link>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168243#M713652</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;When I use the following statement it works fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vListQVDExistsProjectactuals&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NOT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;isnull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;QVDCreateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('D:\Data\123_Projectactuals.qvd'));&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;IF&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vListQVDExistsProjectactuals)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;THEN ..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However there are multiple files ending with &lt;SPAN style="font-size: 8pt;"&gt;Projectactuals, &lt;SPAN style="font-size: 10pt;"&gt;like 456_Projectactuals etc.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I want to check if a file ending with *_Projectfiles exist. How do I do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried&amp;nbsp; &lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vListQVDExistsProjectactuals&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NOT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;isnull&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;QVDCreateTime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('D:\Data\*_Projectactuals.qvd'));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;but that doesn't work as the variable probably wants to have 1 unique file name.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 22:40:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Command-to-check-if-a-QVD-file-exists/m-p/168243#M713652</guid>
      <dc:creator>heij1421</dc:creator>
      <dc:date>2014-12-17T22:40:55Z</dc:date>
    </item>
  </channel>
</rss>

