<?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: Update statistics on a volatile table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Update-statistics-on-a-volatile-table/m-p/355380#M702913</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;&amp;nbsp;&amp;nbsp; Try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its in macro:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;sub Update &lt;/P&gt;&lt;P&gt;set vDisplayCd = ActiveDocument.Variables("vDisplayCd")&lt;/P&gt;&lt;P&gt;NewDisplayCd = vDisplayCd.GetContent.String&amp;nbsp; &lt;/P&gt;&lt;P&gt;Set Result= ActiveDocument.DynamicUpdateCommand("UPDATE * SET FISC_YR_QTR_DSPLY_CD="&amp;amp;NewDisplayCd&amp;amp;" WHERE FieldName='Condition'")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if Result = false then&lt;/P&gt;&lt;P&gt;msgbox Result.ErrorMessage &lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;-------------------------&lt;/P&gt;&lt;P&gt;But why you used update in qlikview? you can use in database, then you will use that table here?? That gives more performance rather than this, i think so...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/1537#1537"&gt;http://community.qlik.com/message/1537#1537&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jul 2012 21:26:07 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2012-07-17T21:26:07Z</dc:date>
    <item>
      <title>Update statistics on a volatile table</title>
      <link>https://community.qlik.com/t5/QlikView/Update-statistics-on-a-volatile-table/m-p/355379#M702912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In order to improve performance, I am trying to update statistics on a volatile table that I created and inserted data into.&amp;nbsp; This is the statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;update statistics for table VT_HIER_WITH_REVENUE_FLASH_BUDGET on every column, (FISC_YR_QTR_DSPLY_CD, PRFT_CTR_GRP_DN, PRFT_CTR_LVL_0_DN, PRFT_CTR_LVL_1_DN, PRFT_CTR_LVL_2_DN) sample;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without the SQL, the command fails with syntax error, so I am using this to indicate this is a SQL command.&amp;nbsp; With the SQL in there, the script run stops and fails.&amp;nbsp; Has anyone successfully updated stats on a volatile table in Qlikview?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 21:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Update-statistics-on-a-volatile-table/m-p/355379#M702912</guid>
      <dc:creator />
      <dc:date>2012-07-17T21:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Update statistics on a volatile table</title>
      <link>https://community.qlik.com/t5/QlikView/Update-statistics-on-a-volatile-table/m-p/355380#M702913</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;&amp;nbsp;&amp;nbsp; Try like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its in macro:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;sub Update &lt;/P&gt;&lt;P&gt;set vDisplayCd = ActiveDocument.Variables("vDisplayCd")&lt;/P&gt;&lt;P&gt;NewDisplayCd = vDisplayCd.GetContent.String&amp;nbsp; &lt;/P&gt;&lt;P&gt;Set Result= ActiveDocument.DynamicUpdateCommand("UPDATE * SET FISC_YR_QTR_DSPLY_CD="&amp;amp;NewDisplayCd&amp;amp;" WHERE FieldName='Condition'")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if Result = false then&lt;/P&gt;&lt;P&gt;msgbox Result.ErrorMessage &lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;-------------------------&lt;/P&gt;&lt;P&gt;But why you used update in qlikview? you can use in database, then you will use that table here?? That gives more performance rather than this, i think so...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/1537#1537"&gt;http://community.qlik.com/message/1537#1537&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 21:26:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Update-statistics-on-a-volatile-table/m-p/355380#M702913</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-07-17T21:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Update statistics on a volatile table</title>
      <link>https://community.qlik.com/t5/QlikView/Update-statistics-on-a-volatile-table/m-p/355381#M702914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to update the stats on the table to improve query performance.&amp;nbsp; I am not doing this on the database as this is a volatile table that is created in the Qlikview script itself. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure what your macro is achieving, but it looks like it is would update fields within the table.&amp;nbsp; I want to ensure my queries compile with up-to-date statistics on the volatile table.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2012 22:04:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Update-statistics-on-a-volatile-table/m-p/355381#M702914</guid>
      <dc:creator />
      <dc:date>2012-07-18T22:04:17Z</dc:date>
    </item>
  </channel>
</rss>

