<?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 does this WHERE clause result in Script Error? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638002#M678275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Len(mail) &amp;gt; 0 in place of the length because it is not identified because length field is identified by Len(mail) if you read this in another table then it is identified. Also place this line in before SQL like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Distinct&lt;/P&gt;&lt;P&gt;Fields&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;Len(mail) as length&lt;/P&gt;&lt;P&gt;where Len(mail) &amp;gt; 0;&lt;/P&gt;&lt;P&gt;SQL select&lt;/P&gt;&lt;P&gt;Fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From location&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2014 13:14:16 GMT</pubDate>
    <dc:creator>its_anandrjs</dc:creator>
    <dc:date>2014-05-19T13:14:16Z</dc:date>
    <item>
      <title>Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638001#M678274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to read users from the Active Directory. Since there are so many records in the AD, I'm trying to add a WHERE clause to limit the number returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can run the following script in debug mode, set number of recs to bring back to 500 and it works fine.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014 0519_09.04.20.AM_0001.jpg" class="jive-image" src="/legacyfs/online/59104_2014 0519_09.04.20.AM_0001.jpg" style="width: 620px; height: 407px;" /&gt;&lt;/P&gt;&lt;P&gt;However, if I add the following WHERE statement I get a Script Error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: courier new,courier;"&gt;WHERE length &amp;gt; 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014 0519_08.57.46.AM_0000.jpg" class="jive-image" src="/legacyfs/online/59109_2014 0519_08.57.46.AM_0000.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me why that WHERE statement would cause a Script error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:08:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638001#M678274</guid>
      <dc:creator />
      <dc:date>2014-05-19T13:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638002#M678275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Len(mail) &amp;gt; 0 in place of the length because it is not identified because length field is identified by Len(mail) if you read this in another table then it is identified. Also place this line in before SQL like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Distinct&lt;/P&gt;&lt;P&gt;Fields&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;Len(mail) as length&lt;/P&gt;&lt;P&gt;where Len(mail) &amp;gt; 0;&lt;/P&gt;&lt;P&gt;SQL select&lt;/P&gt;&lt;P&gt;Fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From location&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:14:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638002#M678275</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-19T13:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638003#M678276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Possibly, you have to write it like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where Len(mail)&amp;gt;0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Because the field Length is not yet created in your source data. Else use the same where condition in the qv load part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638003#M678276</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-19T13:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638004#M678277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Changes&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;Last Time i made some mistake now i corrected that one &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;where&amp;nbsp; Len(Trim(mail))&amp;gt;0;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638004#M678277</guid>
      <dc:creator>nizamsha</dc:creator>
      <dc:date>2014-05-19T13:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638005#M678278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nizam, if trim() has to be used, it would be &lt;STRONG&gt;Len(Trim(mail))&lt;/STRONG&gt; instead. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638005#M678278</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-19T13:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638006#M678279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it will be&amp;nbsp; Trim&amp;nbsp; and then Len function&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; but not required here.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638006#M678279</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-19T13:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638007#M678280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;srry for that &lt;/P&gt;&lt;P&gt;thanks u very much&amp;nbsp; for reminding me,&amp;nbsp; i miss typed that&amp;nbsp; one &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:32:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638007#M678280</guid>
      <dc:creator>nizamsha</dc:creator>
      <dc:date>2014-05-19T13:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638008#M678281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. Your suggestions worked. The part about not using the new field name in the WHERE clause makes sense. However, the part about putting the WHERE clause before the SQL key word doesn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean, it works but I don't understand why. Every example I've seen always has the WHERE clause after the FROM clause inside the SQL keyword. Even the help system says to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even the help system indicates that the WHERE comes after FROM. Strange.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014 0519_09.31.15.AM_0002.jpg" class="jive-image" src="/legacyfs/online/59111_2014 0519_09.31.15.AM_0002.jpg" style="width: 620px; height: 289px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638008#M678281</guid>
      <dc:creator />
      <dc:date>2014-05-19T13:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638009#M678282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See like from any SAP tables or may be SQL tables when we read the tables that has two parts one for SQL and another one for the QLIkview like a preceding load. So if we put the Where clause before the SQL will read by the qlikview table it depends on from which source we are reading is some thing like first we read the table and then filter the table with our requirements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:47:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638009#M678282</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-19T13:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this WHERE clause result in Script Error?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638010#M678283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting. Good to know. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 14:02:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-does-this-WHERE-clause-result-in-Script-Error/m-p/638010#M678283</guid>
      <dc:creator />
      <dc:date>2014-05-19T14:02:14Z</dc:date>
    </item>
  </channel>
</rss>

