<?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: Garbage error after statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282297#M104950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main issue here I can see at a first glance is that you are loading from QVD files with the same syntax you where doing in a SQL statement, and this is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following line is what I'm guessing is throwing the error (you can check that in a debug load)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[QVD\QVFACT.qvd](qvd) fact, [[QVD\QVCSCM.qvd](qvd) cscm&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything after the "(QVD)" that is not a LOAD sentence (WHERE mainly, but there are other you can check in the Reference Manual) is not understood by QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need to specify where to join in QlikView. Well, you do, but QlikView uses named-alike fields to create a relation between both tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming your code, my guess is that you should do something like the following much simplified example (joining tables using where and loading only some of the records):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Table1: // First table&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Code, Name&lt;/P&gt;&lt;P&gt;1, AAA&lt;/P&gt;&lt;P&gt;2, BBB&lt;/P&gt;&lt;P&gt;3, CCC&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2: // Second table, the key field "C" should be renamed so the fields can be associated by QlikView&lt;/P&gt;&lt;P&gt;LOAD C AS Code, Data INLINE [&lt;/P&gt;&lt;P&gt;C, Data&lt;/P&gt;&lt;P&gt;1, 10000&lt;/P&gt;&lt;P&gt;2, 20000&lt;/P&gt;&lt;P&gt;3, 30000&lt;/P&gt;&lt;P&gt;4, 40000&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;WHERE EXISTS(Code, C); // Ok, but only those records for what this tables's "C" field values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // already exist in the previously loaded table "Code" field&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I'm using INLINE loading instead of using QVDs, the syntax is valid anyway. The result of the code above are two tables associated by field "Code", so any selection you do in the first will affect the second table. That's how the associative logic (the magic behind QlikView) works. If you don't want two tables you can JOIN them and put into memory only one table. That will work too adding the "JOIN" keyword before the second LOAD statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jun 2011 09:16:50 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2011-06-13T09:16:50Z</dc:date>
    <item>
      <title>Garbage error after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282293#M104946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Morning to all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the script, it shows a error of Garbage errir after statment. I have verified the script checking of open close of paranthesis everything is perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one suggest me how to resolve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 06:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282293#M104946</guid>
      <dc:creator />
      <dc:date>2011-06-13T06:48:13Z</dc:date>
    </item>
    <item>
      <title>Garbage error after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282294#M104947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I've come accross this issue, it was usually because some worong spelling of SQL statements, not quoting variables where needed and so. Sometimes even using GROUP BY in an optimized LOAD or something. Could you please post some sample code so when cahn check it further?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 07:40:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282294#M104947</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-13T07:40:22Z</dc:date>
    </item>
    <item>
      <title>Garbage error after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282295#M104948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Miguel Angel Baeyens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have just attached the script in my first request, can you gothrough and advise me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 08:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282295#M104948</guid>
      <dc:creator />
      <dc:date>2011-06-13T08:34:30Z</dc:date>
    </item>
    <item>
      <title>Garbage error after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282296#M104949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please load each part separately to identify in which part your issue occurs. Then attempt using LOAD * instead of specified fields, so that you can detemine if the issue is caused by FROM statement or the LOAD definitions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general it is also advisable to not use WHERE filtering when loading from QVD files, as this will make the load unoptimized and thereby slower and less efficient. Especially you will see a difference if the QVD contain a lot of data. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 08:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282296#M104949</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2011-06-13T08:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage error after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282297#M104950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main issue here I can see at a first glance is that you are loading from QVD files with the same syntax you where doing in a SQL statement, and this is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following line is what I'm guessing is throwing the error (you can check that in a debug load)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[QVD\QVFACT.qvd](qvd) fact, [[QVD\QVCSCM.qvd](qvd) cscm&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything after the "(QVD)" that is not a LOAD sentence (WHERE mainly, but there are other you can check in the Reference Manual) is not understood by QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need to specify where to join in QlikView. Well, you do, but QlikView uses named-alike fields to create a relation between both tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming your code, my guess is that you should do something like the following much simplified example (joining tables using where and loading only some of the records):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Table1: // First table&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Code, Name&lt;/P&gt;&lt;P&gt;1, AAA&lt;/P&gt;&lt;P&gt;2, BBB&lt;/P&gt;&lt;P&gt;3, CCC&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2: // Second table, the key field "C" should be renamed so the fields can be associated by QlikView&lt;/P&gt;&lt;P&gt;LOAD C AS Code, Data INLINE [&lt;/P&gt;&lt;P&gt;C, Data&lt;/P&gt;&lt;P&gt;1, 10000&lt;/P&gt;&lt;P&gt;2, 20000&lt;/P&gt;&lt;P&gt;3, 30000&lt;/P&gt;&lt;P&gt;4, 40000&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;WHERE EXISTS(Code, C); // Ok, but only those records for what this tables's "C" field values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // already exist in the previously loaded table "Code" field&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I'm using INLINE loading instead of using QVDs, the syntax is valid anyway. The result of the code above are two tables associated by field "Code", so any selection you do in the first will affect the second table. That's how the associative logic (the magic behind QlikView) works. If you don't want two tables you can JOIN them and put into memory only one table. That will work too adding the "JOIN" keyword before the second LOAD statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 09:16:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282297#M104950</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-13T09:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Garbage error after statement</title>
      <link>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282298#M104951</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;&lt;/P&gt;&lt;P&gt;Please check your where condition as i go through with your code, in where codition you have used &lt;STRONG style="color: #00b400; font-size: 8pt;"&gt;&lt;STRONG style="color: #00b400; font-size: 8pt;"&gt;[Payment Flag]&amp;lt;&amp;gt;'P' &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #00b400; font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Arial;"&gt;In your code Payment Flag field is not in use and not mention from which table you are taking this as fact or cscm . So, may be this is the reason due to which it gives garbage error.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt; &lt;/SPAN&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Neetu Singh &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Arial;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial; color: #00b400; font-size: 8pt;"&gt;&lt;STRONG style=": ; color: #000000; font-size: 12pt; font-family: Times New Roman;"&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jun 2011 09:21:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Garbage-error-after-statement/m-p/282298#M104951</guid>
      <dc:creator>neetu_singh</dc:creator>
      <dc:date>2011-06-13T09:21:25Z</dc:date>
    </item>
  </channel>
</rss>

