<?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: Why failed in QlikView Server, ETL failed with error - Unexpected Token in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-failed-in-QlikView-Server-ETL-failed-with-error-Unexpected/m-p/1654827#M730003</link>
    <description>&lt;P&gt;How does the variable $(x) looks like?&lt;/P&gt;</description>
    <pubDate>Fri, 06 Dec 2019 03:17:52 GMT</pubDate>
    <dc:creator>Arthur_Fong</dc:creator>
    <dc:date>2019-12-06T03:17:52Z</dc:date>
    <item>
      <title>Why failed in QlikView Server, ETL failed with error - Unexpected Token</title>
      <link>https://community.qlik.com/t5/QlikView/Why-failed-in-QlikView-Server-ETL-failed-with-error-Unexpected/m-p/1654489#M730002</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried below srcipt running on my laptop for more then 10 times and it successful. but when i deploy this to qlikview server. it failed with error "Error: Unexpected token: ',', expected one of: 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', 'and', ..."&lt;/P&gt;&lt;P&gt;I dont know what else to be fixed. below is my script.&lt;/P&gt;&lt;P&gt;Month:&lt;BR /&gt;Load Distinct&lt;BR /&gt;num(Month(BIOMETRIC_DT), '00')as NumMonth&lt;BR /&gt;From&lt;BR /&gt;D:\QlikView\QVD\REPORT_HIST.qvd(qvd);&lt;/P&gt;&lt;P&gt;Let vCount = noofrows('Month');&lt;/P&gt;&lt;P&gt;For i=0 to $(vCount) -1&lt;BR /&gt;Let y = If($(x) = 0, 0, $(x) * -1);&lt;BR /&gt;Let vMonth = peek('NumMonth',$(i),'Month');&lt;BR /&gt;Let vYYYY = Year(MonthStart(AddMonths((Date(Today (), 'DD/MM/YYYY')), $(y))));&lt;/P&gt;&lt;P&gt;$(vMonth):&lt;/P&gt;&lt;P&gt;Load * from&lt;BR /&gt;D:\QlikView\QVD\REPORT_HIST.qvd(qvd)&lt;BR /&gt;where Month(BIOMETRIC_DT) = $(vMonth) AND year(BIOMETRIC_DT) = $(vYYYY);&lt;/P&gt;&lt;P&gt;Store $(vMonth) into D:\QlikView\QVD\DAILY_REPORT_$(vYYYY)$(vMonth).qvd(qvd);&lt;/P&gt;&lt;P&gt;Drop Table $(vMonth);&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the error ended with:&lt;/P&gt;&lt;P&gt;2019-12-05 08:23:29 2469 Let vCount = noofrows('Month')&lt;BR /&gt;2019-12-05 08:23:29 2471 For i=0 to 4 -1&lt;BR /&gt;2019-12-05 08:23:29 Error: Unexpected token: ',', expected one of: 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', 'and', ...&lt;BR /&gt;2019-12-05 08:23:29 Execution Failed&lt;BR /&gt;2019-12-05 08:23:29 Execution finished.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-failed-in-QlikView-Server-ETL-failed-with-error-Unexpected/m-p/1654489#M730002</guid>
      <dc:creator>jim_chan</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why failed in QlikView Server, ETL failed with error - Unexpected Token</title>
      <link>https://community.qlik.com/t5/QlikView/Why-failed-in-QlikView-Server-ETL-failed-with-error-Unexpected/m-p/1654827#M730003</link>
      <description>&lt;P&gt;How does the variable $(x) looks like?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 03:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-failed-in-QlikView-Server-ETL-failed-with-error-Unexpected/m-p/1654827#M730003</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2019-12-06T03:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why failed in QlikView Server, ETL failed with error - Unexpected Token</title>
      <link>https://community.qlik.com/t5/QlikView/Why-failed-in-QlikView-Server-ETL-failed-with-error-Unexpected/m-p/1658221#M730004</link>
      <description>&lt;P&gt;Jim, did you get things figured out on your own, or are you still looking for help?&amp;nbsp; Arthur posted a question for you, and that would seem to be the row causing the issue here, so if you were able to figure out what the problem was, please consider posting the solution yourself, and once posted, you can then use the Accept as Solution button on that post to mark it, that way others will know what the problem was too.&lt;/P&gt;
&lt;P&gt;The only strange thing I see is in the row prior things are 0 to 4 -1 instead of 0 to 3, the -1 seems to not be taken into account, which may be same issue in the following line...&amp;nbsp; Here is a Design Blog post that might be of some use:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Loops-in-the-Script/ba-p/1473543" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Loops-in-the-Script/ba-p/1473543&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2019 20:36:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-failed-in-QlikView-Server-ETL-failed-with-error-Unexpected/m-p/1658221#M730004</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-12-16T20:36:24Z</dc:date>
    </item>
  </channel>
</rss>

