<?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 ORDER BY after WHERE selection in Load Script Error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230609#M82421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone please shed any light on why my ORDER BY statement doesn't work after my WHERE selection when loading a table from qvd within the script.&lt;/P&gt;&lt;P&gt;The WHERE statement works fine but throws an error "Garbage after statement" when i add the ORDER BY and try to reload the data.&lt;/P&gt;&lt;P&gt;Any help will be great!&lt;/P&gt;&lt;P&gt;Thanks, Joe&lt;/P&gt;&lt;P&gt;This is the code I am using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;B&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&lt;BR /&gt;TOPSSALES1:&lt;BR /&gt;&lt;/I&gt;&lt;B&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;/B&gt;&lt;B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; [Invoice Number],&lt;BR /&gt;[Order Number]&lt;BR /&gt;&lt;BR /&gt;,&lt;BR /&gt;[Kit Indicator],&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[Customer Code]&lt;BR /&gt;&lt;BR /&gt;,&lt;BR /&gt;[Invoice Date]&lt;BR /&gt;&lt;BR /&gt;,&lt;BR /&gt;Date&lt;BR /&gt;&lt;BR /&gt;([Invoice Date]) &lt;B&gt;AS&lt;/B&gt; InvoiceDate,&lt;BR /&gt;[Financial Week]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;BR /&gt;FROM&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;E&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(&lt;BR /&gt;qvd) &lt;B&gt;WHERE&lt;/B&gt; [Invoice Date] &amp;gt; '2009-01-01' &lt;B&gt;AND&lt;/B&gt; [Kit Indicator] &amp;lt;&amp;gt; 'P' &lt;B&gt;AND&lt;/B&gt; [Kit Indicator] &amp;lt;&amp;gt; 'C' &lt;B&gt;ORDER&lt;/B&gt; &lt;B&gt;BY&lt;/B&gt; InvoiceDate ASC;&lt;BR /&gt;&lt;/E&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Feb 2010 17:31:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-02-03T17:31:10Z</dc:date>
    <item>
      <title>ORDER BY after WHERE selection in Load Script Error</title>
      <link>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230609#M82421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone please shed any light on why my ORDER BY statement doesn't work after my WHERE selection when loading a table from qvd within the script.&lt;/P&gt;&lt;P&gt;The WHERE statement works fine but throws an error "Garbage after statement" when i add the ORDER BY and try to reload the data.&lt;/P&gt;&lt;P&gt;Any help will be great!&lt;/P&gt;&lt;P&gt;Thanks, Joe&lt;/P&gt;&lt;P&gt;This is the code I am using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;B&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&lt;BR /&gt;TOPSSALES1:&lt;BR /&gt;&lt;/I&gt;&lt;B&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;&lt;/B&gt;&lt;B&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; [Invoice Number],&lt;BR /&gt;[Order Number]&lt;BR /&gt;&lt;BR /&gt;,&lt;BR /&gt;[Kit Indicator],&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;[Customer Code]&lt;BR /&gt;&lt;BR /&gt;,&lt;BR /&gt;[Invoice Date]&lt;BR /&gt;&lt;BR /&gt;,&lt;BR /&gt;Date&lt;BR /&gt;&lt;BR /&gt;([Invoice Date]) &lt;B&gt;AS&lt;/B&gt; InvoiceDate,&lt;BR /&gt;[Financial Week]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;B&gt;&lt;BR /&gt;FROM&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;E&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(&lt;BR /&gt;qvd) &lt;B&gt;WHERE&lt;/B&gt; [Invoice Date] &amp;gt; '2009-01-01' &lt;B&gt;AND&lt;/B&gt; [Kit Indicator] &amp;lt;&amp;gt; 'P' &lt;B&gt;AND&lt;/B&gt; [Kit Indicator] &amp;lt;&amp;gt; 'C' &lt;B&gt;ORDER&lt;/B&gt; &lt;B&gt;BY&lt;/B&gt; InvoiceDate ASC;&lt;BR /&gt;&lt;/E&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 17:31:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230609#M82421</guid>
      <dc:creator />
      <dc:date>2010-02-03T17:31:10Z</dc:date>
    </item>
    <item>
      <title>ORDER BY after WHERE selection in Load Script Error</title>
      <link>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230610#M82422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can't order a qvd file, for doing it, your code must be the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;TOPSSALES1Temp:&lt;BR /&gt;LOAD&lt;BR /&gt;[Invoice Number],&lt;BR /&gt;[Order Number],&lt;BR /&gt;[Kit Indicator],&lt;BR /&gt;[Customer Code],&lt;BR /&gt;[Invoice Date],&lt;BR /&gt;Date ([Invoice Date]) AS InvoiceDate,&lt;BR /&gt;[Financial Week]&lt;BR /&gt;FROM &lt;E&gt; (qvd)&lt;BR /&gt;WHERE [Invoice Date] &amp;gt; '2009-01-01' AND [Kit Indicator] &amp;lt;&amp;gt; 'P' AND [Kit Indicator] &amp;lt;&amp;gt; 'C';&lt;BR /&gt;TOPSSALES1:&lt;BR /&gt;NOCONCATENATE LOAD *&lt;BR /&gt;RESIDENT TOPSSALES1Temp&lt;BR /&gt;ORDER BY InvoiceDate ASC;&lt;BR /&gt;DROP TABLE TOPSSALES1Temp;&lt;BR /&gt;&lt;/E&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 17:43:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230610#M82422</guid>
      <dc:creator />
      <dc:date>2010-02-03T17:43:50Z</dc:date>
    </item>
    <item>
      <title>ORDER BY after WHERE selection in Load Script Error</title>
      <link>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230611#M82423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorted! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thank you very much!&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 17:56:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230611#M82423</guid>
      <dc:creator />
      <dc:date>2010-02-03T17:56:31Z</dc:date>
    </item>
    <item>
      <title>ORDER BY after WHERE selection in Load Script Error</title>
      <link>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230612#M82424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear&lt;/P&gt;&lt;P&gt;is there anyother way to Order Field of Qvd ?.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 10:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ORDER-BY-after-WHERE-selection-in-Load-Script-Error/m-p/230612#M82424</guid>
      <dc:creator>suniljain</dc:creator>
      <dc:date>2011-02-10T10:29:34Z</dc:date>
    </item>
  </channel>
</rss>

