<?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: Error: Garbage after statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634718#M232818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Massimo.&amp;nbsp; I have it set on my main tab &lt;/P&gt;&lt;P&gt;LET vQVDPurgeDate = chr(39) &amp;amp; today()-92 &amp;amp; chr(39);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works when I run just that snippet.&amp;nbsp; Something odd is going on here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2014 21:07:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-05-30T21:07:12Z</dc:date>
    <item>
      <title>Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634716#M232816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a document with an incremental load.&amp;nbsp; I'm reading in a QVD and purging my data for anything older than three months. I then want to concatenate that data set to the current day's transactions.&amp;nbsp; For some reason I'm getting a rather unusual error after the statement and I can't figure out why.&amp;nbsp; I will say in the log file it shows shows the STORE TSRTRAN command executing successfully, but my QVD doesn't get updated and I get an error.&amp;nbsp; I've attached both the qvw and log file.&amp;nbsp; I appreciate any insight! &lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MaxDate:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(CRT_DT) as LastCRT_DT&lt;/P&gt;&lt;P&gt;FROM $(Lvl1QVDdirectory)TSRTRAN.qvd (qvd);&lt;/P&gt;&lt;P&gt;vLastLoadDate = chr(39) &amp;amp; date(peek('LastCRT_DT',-1,'MaxDate'),'YYYY-MM-DD') &amp;amp; chr(39);&lt;/P&gt;&lt;P&gt;DROP Table MaxDate;&lt;/P&gt;&lt;P&gt;vDailyLoadDate = chr(39) &amp;amp; date(Today(),'YYYY-MM-DD') &amp;amp; chr(39);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Gather current run's dataset which will be appeneded to the master&lt;/P&gt;&lt;P&gt;//QVD.&lt;/P&gt;&lt;P&gt;TSRTRAN_tmp:&lt;/P&gt;&lt;P&gt;LOAD TRAN_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRNT_TRAN_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SRV_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DOC_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CRT_TS, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MOD_TS, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ERR_TYP_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PHYS_SRVR_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STTS_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CUR_RETRIES_NUM, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USR_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END_TS, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BUS_STTS, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CRT_DT&lt;/P&gt;&lt;P&gt;FROM $(Lvl1QVDdirectory)TSRTRAN.qvd (qvd)&lt;/P&gt;&lt;P&gt;where CRT_DT &amp;gt; $(vQVDPurgeDate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT "TRAN_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "PRNT_TRAN_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "SRV_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "DOC_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "CRT_TS",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "MOD_TS",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ERR_TYP_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "PHYS_SRVR_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "STTS_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "CUR_RETRIES_NUM",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "USR_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "END_TS",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "BUS_STTS",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "CRT_DT"&lt;/P&gt;&lt;P&gt;FROM WMBTCH.TSRTRAN&lt;/P&gt;&lt;P&gt;where CRT_DT &amp;gt; $(vLastLoadDate) and CRT_DT &amp;lt; $(vDailyLoadDate);&lt;/P&gt;&lt;P&gt;STORE TSRTRAN_tmp into $(Lvl1QVDdirectory)TSRTRAN.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table TSRTRAN;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 20:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634716#M232816</guid>
      <dc:creator />
      <dc:date>2014-05-30T20:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634717#M232817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in first load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5/30/2014 4:42:28 PM: 0103&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CRT_DT&lt;/P&gt;&lt;P&gt;5/30/2014 4:42:28 PM: 0104&amp;nbsp; FROM ..\QVD\Extract\TSRTRAN.qvd (qvd)&lt;/P&gt;&lt;P&gt;5/30/2014 4:42:28 PM: 0105&amp;nbsp; where CRT_DT &amp;gt; ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;vQVDPurgeDate is not defined&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 21:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634717#M232817</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-30T21:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634718#M232818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Massimo.&amp;nbsp; I have it set on my main tab &lt;/P&gt;&lt;P&gt;LET vQVDPurgeDate = chr(39) &amp;amp; today()-92 &amp;amp; chr(39);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works when I run just that snippet.&amp;nbsp; Something odd is going on here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 21:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634718#M232818</guid>
      <dc:creator />
      <dc:date>2014-05-30T21:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634719#M232819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But your right it doesn't show up in the log.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 21:07:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634719#M232819</guid>
      <dc:creator />
      <dc:date>2014-05-30T21:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634720#M232820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using date variables like this, I always put them in single quotes:&lt;/P&gt;&lt;P&gt;where CRT_DT &amp;gt; '$(vLastLoadDate)' and CRT_DT &amp;lt; '$(vDailyLoadDate)';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 21:13:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634720#M232820</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-30T21:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634721#M232821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael - I'll try that out next.&amp;nbsp; This is error stands between me and my vacation so I appreciate all suggestions right now.&amp;nbsp; Do the single quotes change the way QV interprets the variables?&amp;nbsp; I've never used them before, but I'm fairly new.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 21:16:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634721#M232821</guid>
      <dc:creator />
      <dc:date>2014-05-30T21:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634722#M232822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At least it will interpret the date correctly.&amp;nbsp; For example, If I used a fixed date, it would be&lt;/P&gt;&lt;P&gt;where CRT_DT &amp;gt; '2014-05-30'&lt;/P&gt;&lt;P&gt;never&lt;/P&gt;&lt;P&gt;where CRT_DT &amp;gt; 2014-05-30&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 21:20:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634722#M232822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-30T21:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634723#M232823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Matthew.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable vQVDPurgeDate is not showing in the log because it is really not being set properly. Check the Variables Overview. Try changing the command to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vQVDPurgeDate = chr(39) &amp;amp; date(today()-92,'YYYY-MM-DD') &amp;amp; chr(39);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: You'll probably get an error on the select for the new transaction because vLastLoadDate is being set to YYYY-MM-DD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 21:36:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634723#M232823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-30T21:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Garbage after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634724#M232824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Bruno!!&amp;nbsp; That was it I need to format it as date....Frustrating, but I hopefully won't make that oversight in the near future.&amp;nbsp; I really appreciate everyone's help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 21:59:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-Garbage-after-statement/m-p/634724#M232824</guid>
      <dc:creator />
      <dc:date>2014-05-30T21:59:16Z</dc:date>
    </item>
  </channel>
</rss>

