<?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: Using if condition to store into qvd in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825774#M1043956</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;If I understand you. You want to store data coming from SQL into a table in QVD file if a particular table has data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What might be worth trying is using QvdTableName.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; So&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(QvdTableName('D:\Dir\FileName.qvd')) &amp;lt;&amp;gt; 0 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE blah blah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit blah blah&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give that a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Dec 2014 02:50:44 GMT</pubDate>
    <dc:creator>Gabriel</dc:creator>
    <dc:date>2014-12-14T02:50:44Z</dc:date>
    <item>
      <title>Using if condition to store into qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825769#M1043951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am loading data into table, but I only want to store data into qvd (overwrite existing qvd) if the the table contains data. If the table contains no data, I want to keep the existing qvd. I am getting an error on if statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//load new data&lt;/P&gt;&lt;P&gt;StockLevels:&lt;/P&gt;&lt;P&gt;LOAD "ITEMS";&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ITEMS"&lt;/P&gt;&lt;P&gt;FROM "PRODUCTS";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//check&lt;/P&gt;&lt;P&gt;if Count(Peek(ITEMS)) = 0 then&lt;/P&gt;&lt;P&gt;Store StockLevels into ..\QVD\StockLevels.qvd;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;Drop Tables StockLevels;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 11:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825769#M1043951</guid>
      <dc:creator>martyn_birzys</dc:creator>
      <dc:date>2014-12-13T11:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using if condition to store into qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825770#M1043952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;you have to try incremental load concept&lt;/P&gt;&lt;P&gt;check this link&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/84146"&gt;Incremental load in Qlikview&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 11:14:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825770#M1043952</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2014-12-13T11:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using if condition to store into qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825771#M1043953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/123692"&gt;incremental load types&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 11:16:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825771#M1043953</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2014-12-13T11:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using if condition to store into qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825772#M1043954</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;As i understand you want to store the data into qvd if there is data into the SQL tables otherwise do not store the QVD. Then check for no of rows in the table like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//load new data&lt;/P&gt;&lt;P&gt;StockLevels:&lt;/P&gt;&lt;P&gt;LOAD "ITEMS";&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ITEMS"&lt;/P&gt;&lt;P&gt;FROM "PRODUCTS";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vNoofRows = NoOfRows('StockLevels'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//check&lt;/P&gt;&lt;P&gt;if&amp;nbsp; $(vNoofRows) &amp;gt; 0 then&lt;/P&gt;&lt;P&gt;Store StockLevels into ..\QVD\StockLevels.qvd;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;Drop Tables StockLevels;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 11:29:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825772#M1043954</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-12-13T11:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using if condition to store into qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825773#M1043955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if NoOfRows('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;StockLevels&lt;/SPAN&gt;') &amp;gt; 0 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trace rows&amp;gt;0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; store ...........;&lt;/P&gt;&lt;P&gt;endif;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2014 22:49:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825773#M1043955</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-12-13T22:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using if condition to store into qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825774#M1043956</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;If I understand you. You want to store data coming from SQL into a table in QVD file if a particular table has data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What might be worth trying is using QvdTableName.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; So&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(QvdTableName('D:\Dir\FileName.qvd')) &amp;lt;&amp;gt; 0 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE blah blah&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit blah blah&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give that a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 02:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825774#M1043956</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2014-12-14T02:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using if condition to store into qvd</title>
      <link>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825775#M1043957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try&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;if&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;NoOfRows('StockLevels')&lt;/SPAN&gt; &amp;gt; 0 then&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Store StockLevels into ..\QVD\StockLevels.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end if&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;thanks,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Rajesh Vaswani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 05:31:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-if-condition-to-store-into-qvd/m-p/825775#M1043957</guid>
      <dc:creator>rajeshvaswani77</dc:creator>
      <dc:date>2014-12-14T05:31:57Z</dc:date>
    </item>
  </channel>
</rss>

