<?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: how to write if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121212#M463792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For check if table exists :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For SQL Server&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #7d2727;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; INFORMATION_SCHEMA&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;TABLES &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; TABLE_TYPE&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'BASE TABLE'&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;AND&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; TABLE_NAME&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'mytablename'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;For oracle&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;select&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; count&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(*)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;into&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; c &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; user_tables &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;where&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; table_name &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; upper&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'table_name'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;);&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;and after use the Manuel solution.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;Aurélien&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jun 2016 08:57:01 GMT</pubDate>
    <dc:creator>Aurelien_Martinez</dc:creator>
    <dc:date>2016-06-03T08:57:01Z</dc:date>
    <item>
      <title>how to write if statement</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121209#M463789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I really have no clue whether the thing i am looking is possible&amp;nbsp; in qlikview or not&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the thing is ,currently i moved my application from quality server to production and the issuse is a table which is existing in quality server will be exist in production server after a while i mean in a two months,&lt;/P&gt;&lt;P&gt;so what i am looking is i need to write a code in a way so that&lt;STRONG&gt; it should check if the table is existing in server then load the table in to qvd if not skip that without throwing error and without&amp;nbsp; halting the script run.&lt;/STRONG&gt;.....is it possible&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;coal:&lt;/P&gt;&lt;P&gt;SELECT * from ZCOAL_FINAL_DASH;&lt;/P&gt;&lt;P&gt;&amp;nbsp; STORE coal into $(vPath)Coal.qvd(qvd);&lt;/P&gt;&lt;P&gt;DROP Table coal;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 08:15:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121209#M463789</guid>
      <dc:creator>kunkumnaveen</dc:creator>
      <dc:date>2016-06-03T08:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to write if statement</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121210#M463790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use NoOfRows, if there isn't any row you will not load this table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;coal:&lt;/P&gt;&lt;P&gt;LOAD *;&lt;/P&gt;&lt;P&gt;SELECT * from ZCOAL_FINAL_DASH;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NoOfWors('coal')&amp;gt;0 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp; STORE coal into $(vPath)Coal.qvd(qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp; DROP Table coal;&lt;/P&gt;&lt;P&gt;END IF;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 08:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121210#M463790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-03T08:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to write if statement</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121211#M463791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;still getting same error&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126779_screen.png" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 08:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121211#M463791</guid>
      <dc:creator>kunkumnaveen</dc:creator>
      <dc:date>2016-06-03T08:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to write if statement</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121212#M463792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For check if table exists :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For SQL Server&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #7d2727;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; INFORMATION_SCHEMA&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt;TABLES &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; TABLE_TYPE&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'BASE TABLE'&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;AND&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; TABLE_NAME&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'mytablename'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;For oracle&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;"&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;select&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; count&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(*)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;into&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; c &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; user_tables &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #101094;"&gt;where&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; table_name &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #303336;"&gt; upper&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;'table_name'&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;);&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;and after use the Manuel solution.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="str" style="color: #7d2727;"&gt;&lt;SPAN class="pun" style="color: #303336;"&gt;Aurélien&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 08:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121212#M463792</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2016-06-03T08:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to write if statement</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121213#M463793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like an sql error rather than a qlikview error..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be you are missing the scehma prefix in you select statement in qlik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * from &lt;STRONG&gt;[dbo]&lt;/STRONG&gt;.ZCOAL_FINAL_DASH;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hth&lt;/P&gt;&lt;P&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 08:58:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121213#M463793</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2016-06-03T08:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to write if statement</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121214#M463794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Sorry, I misunderstood your question. Please ignore my above comment&lt;/P&gt;&lt;P&gt;set ErrorMode=0;&amp;nbsp; //to suppress the message box&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;if (ScriptError=2) or (ScriptError=10) then&amp;nbsp;&amp;nbsp; ///2 general error 10 table not found&lt;/P&gt;&lt;P&gt;STORE coal into $(vPath)Coal.qvd(qvd);&lt;/P&gt;&lt;P&gt;DROP Table coal;&lt;/P&gt;&lt;P class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;end if;&lt;/P&gt;&lt;P class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;&lt;/P&gt;&lt;P class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;hth&lt;/P&gt;&lt;P class="Code" data-mc-conditions="Primary.NotToTranslate"&gt;Sasi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 09:21:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121214#M463794</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2016-06-03T09:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to write if statement</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121215#M463795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naveen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TableExists:&lt;/P&gt;&lt;P&gt;//Here search on Objects of data base if your table exists on server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NoOfWors('TableExists')&amp;gt;0 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coal:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * from ZCOAL_FINAL_DASH;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; STORE coal into $(vPath)Coal.qvd(qvd);&lt;/P&gt;&lt;P&gt;&amp;nbsp; DROP Table coal;&lt;/P&gt;&lt;P&gt;END IF;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 09:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-write-if-statement/m-p/1121215#M463795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-03T09:34:59Z</dc:date>
    </item>
  </channel>
</rss>

