<?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 Drop table only if it exists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180767#M47066</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you are another one, maybe more practical, using system function TableName()&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If (len(TableName('YourTable')) &amp;gt; 0) Then Drop Table &lt;I&gt;YourTable&lt;/I&gt;; End If&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Mar 2010 08:32:50 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2010-03-16T08:32:50Z</dc:date>
    <item>
      <title>Drop table only if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180762#M47061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;In a .qvw I created a QV table inside a condition statement.&lt;/P&gt;&lt;P&gt;Opening binary the above one in another .qvw file, I need to check if the QV table has been created.&lt;/P&gt;&lt;P&gt;Is there a way to check if a QV table exists before calling a drop table statement ?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 14:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180762#M47061</guid>
      <dc:creator />
      <dc:date>2010-03-15T14:49:40Z</dc:date>
    </item>
    <item>
      <title>Drop table only if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180763#M47062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;There is a system field called $Table which stores all actually loaded tables, so checking this field (with peek(), for exmple) for that table value should work for you.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 15:10:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180763#M47062</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-03-15T15:10:35Z</dc:date>
    </item>
    <item>
      <title>Drop table only if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180764#M47063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If the table has a key column, you can do something like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LET IsFieldAvailable = peek('keyColumn');&lt;BR /&gt;IF IsFieldAvailable THEN&lt;BR /&gt; DROP TABLE myTable;&lt;BR /&gt;END IF;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Lucas Blancher&lt;/P&gt;&lt;P&gt;BizXcel Inc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 15:14:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180764#M47063</guid>
      <dc:creator>lblancher</dc:creator>
      <dc:date>2010-03-15T15:14:22Z</dc:date>
    </item>
    <item>
      <title>Drop table only if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180765#M47064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The following should work:&lt;/P&gt;&lt;P&gt;if noOfRows('tablename') &amp;gt; 0 then&lt;BR /&gt; drop table tablename;&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;regards&lt;BR /&gt;/Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 17:47:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180765#M47064</guid>
      <dc:creator />
      <dc:date>2010-03-15T17:47:26Z</dc:date>
    </item>
    <item>
      <title>Drop table only if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180766#M47065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Other way is to set the errormode variable appropriately so in case of error, it skips it and not terminate. Something like:&lt;/P&gt;&lt;P&gt;Set ErrorMode = 0; //Set it to skip error&lt;/P&gt;&lt;P&gt;DROP Table xyz;&lt;/P&gt;&lt;P&gt;Set ErrorMode = 1; //Set it back to standard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Mar 2010 20:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180766#M47065</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2010-03-15T20:33:34Z</dc:date>
    </item>
    <item>
      <title>Drop table only if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180767#M47066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you are another one, maybe more practical, using system function TableName()&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If (len(TableName('YourTable')) &amp;gt; 0) Then Drop Table &lt;I&gt;YourTable&lt;/I&gt;; End If&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Mar 2010 08:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180767#M47066</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-03-16T08:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Drop table only if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180768#M47067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;great solution but small correction:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If (len(&lt;STRONG&gt;TableNumber&lt;/STRONG&gt;('YourTable')) &amp;gt; 0) Then Drop Table &lt;EM&gt;YourTable&lt;/EM&gt;; End If&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 19:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/180768#M47067</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-21T19:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Drop table only if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/1687235#M450448</link>
      <description>&lt;P&gt;Hello ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution set errormode = 0 worked for me!&lt;/P&gt;&lt;P&gt;Other solutions fail because the table can't be checked on rows etc while it is simply not existing!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 09:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Drop-table-only-if-it-exists/m-p/1687235#M450448</guid>
      <dc:creator>janderooij</dc:creator>
      <dc:date>2020-03-24T09:49:28Z</dc:date>
    </item>
  </channel>
</rss>

