<?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: Some scripting help needed - general script error occuring in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Some-scripting-help-needed-general-script-error-occuring/m-p/552279#M690665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - solved.&lt;/P&gt;&lt;P&gt;After looking at it approx. 1000 times, I realized that, in the course of creating that qvs file on Friday, I had recreated two variables with different names.&lt;/P&gt;&lt;P&gt;So, since the scripting_editor does not show errors in variables once they are enclosed in this $() - which the book says should always be used? - I didn't notice that the variable didn't exist anymore - so the RESIDENT LOAD naturally failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Sep 2013 11:45:53 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2013-09-23T11:45:53Z</dc:date>
    <item>
      <title>Some scripting help needed - general script error occuring</title>
      <link>https://community.qlik.com/t5/QlikView/Some-scripting-help-needed-general-script-error-occuring/m-p/552278#M690664</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 have one diagram drawing on a database table that has no history.&lt;/P&gt;&lt;P&gt;=&amp;gt; I store the current date and a value in a qvd file every day, thus creating my own.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; Every other day, that app produces a "general script error". I cannot spot it.&lt;/P&gt;&lt;P&gt;Can anybody help me here, please?&lt;/P&gt;&lt;P&gt;The code is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// First, I load the "qvd history" that is already there:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Datum_num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Datum_num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Datum_Hist&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(Datum_Sp_AOS) as %Datum,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Anzahl_Sachnrn&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;[..\01_QVD\Historische_qvd\Historie_Sperr1_64.qvd] (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;qvd&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;// Then I have to find out whether the preceding LOAD from a qvd has returned any records. (If not, I just want to construct a record with the current date and the nr. 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;LET &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;v_Nr_Rows_Sperr1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoOfRows&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Sperr1_AOS');&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;// Next I have a RESIDENT LOAD from this preceding LOAD where I have to take into account this variable that tells me whether anything was found. I have two WHERE clauses because the app now runs all 3 hrs and I want the record for today only once and I want it after 11am - that is about the middle of a working_day, giving me a good approximation of the correct value (the value in the first run at about 3am would be more representative for yesterday)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;CONCATENATE&amp;nbsp; (Hist_Sp1_64)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(v_today)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Datum_num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(v_Nr_Rows_Sperr1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&amp;gt;0, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BIN_ITEM_DETAIL.ITEM_NUMBER&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), 0) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Anzahl_Sachnrn&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sperr1_AOS&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NOT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;EXISTS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Datum_Hist&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(v_today)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;() &amp;gt; '11:00:00'&lt;BR /&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;It is at this point that the script usually produces a "General script error". I see just now in the log file it says "Misplaced FROM", easy enough - but all the commands are in blue which looks right to me. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;P.S.: What's making this all quite confusing is that it seems to me that at some times, the script executes to the end - there is an error in the log, but it doesn't stop there - but the management_console says "Failed".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.P.S.: One more strange thing - in the error message popup I see when I update manually, that CONCATENATE is visible twice - the same LOAD statement is printed there, immediately followed by a CONCATENATE and the same thing again - I don't have that in the script twice.&lt;/P&gt;&lt;P&gt;It looks like the semicolon was missing - but it is there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 07:24:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Some-scripting-help-needed-general-script-error-occuring/m-p/552278#M690664</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-23T07:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Some scripting help needed - general script error occuring</title>
      <link>https://community.qlik.com/t5/QlikView/Some-scripting-help-needed-general-script-error-occuring/m-p/552279#M690665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - solved.&lt;/P&gt;&lt;P&gt;After looking at it approx. 1000 times, I realized that, in the course of creating that qvs file on Friday, I had recreated two variables with different names.&lt;/P&gt;&lt;P&gt;So, since the scripting_editor does not show errors in variables once they are enclosed in this $() - which the book says should always be used? - I didn't notice that the variable didn't exist anymore - so the RESIDENT LOAD naturally failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 11:45:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Some-scripting-help-needed-general-script-error-occuring/m-p/552279#M690665</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-23T11:45:53Z</dc:date>
    </item>
  </channel>
</rss>

