<?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: Load variable as table name not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019277#M928373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will still need to enclose the variable in square braces or single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either of the options below will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'$(table)':&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;File;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[$(table)]:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;File;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Mar 2016 18:31:16 GMT</pubDate>
    <dc:creator>Colin-Albert</dc:creator>
    <dc:date>2016-03-17T18:31:16Z</dc:date>
    <item>
      <title>Load variable as table name not working</title>
      <link>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019272#M928364</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;I would like to use a variable that has a date stored in it as my table name, but I keep getting the error: Unknown Statement 01-Feb-2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First I load my date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Date(Timestamp#(Date,'DD-MMM-YYYY hh.mm.ss TT'),'DD-MMM-YYYY')&amp;nbsp; as Date (this works the dates look normal)&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;File;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxDate:&lt;/P&gt;&lt;P&gt;Date(Max(Date)) as MaxDate (if I only do Max(Date) as MaxDate I get the number 40125 instead of a date)&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMaxDate = peek('MaxDate',0,'vMaxDate'); (this also works it stores 01-Feb-2015)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table Date;&lt;/P&gt;&lt;P&gt;Drop table MaxDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set table = $(vMaxDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(table):&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;File;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then I get the &lt;STRONG&gt;Unknown Statement: 01-Feb-2015&lt;/STRONG&gt; error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019272#M928364</guid>
      <dc:creator>stjernvd</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Load variable as table name not working</title>
      <link>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019273#M928365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using [...] around your variable expansion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[$(table)]:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;File;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 18:21:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019273#M928365</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-17T18:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Load variable as table name not working</title>
      <link>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019274#M928368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the dash(-) cant be used as part of table name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 18:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019274#M928368</guid>
      <dc:creator>alexpanjhc</dc:creator>
      <dc:date>2016-03-17T18:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Load variable as table name not working</title>
      <link>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019275#M928371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #ff0000;"&gt;[$(table)]:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;x&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;x&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;x&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;File;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 18:24:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019275#M928371</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-17T18:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Load variable as table name not working</title>
      <link>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019276#M928372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Max(Date), 'DDMMYYYY') as MaxDate&lt;/P&gt;&lt;P&gt;to remove the dashes from the date so you use 01FEB2015 rather than 01-FEB-2015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dash is not an acceptable character in a tablename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure why you would want a table name that changes though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 18:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019276#M928372</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2016-03-17T18:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Load variable as table name not working</title>
      <link>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019277#M928373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will still need to enclose the variable in square braces or single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either of the options below will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'$(table)':&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;File;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[$(table)]:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;x&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;File;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 18:31:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-variable-as-table-name-not-working/m-p/1019277#M928373</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2016-03-17T18:31:16Z</dc:date>
    </item>
  </channel>
</rss>

