<?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: using WHERE in LOAD more than once in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293110#M1184745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;the trick here is to invert your conditions, just so:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Temperatures2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT temperatures &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE not &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ((ID_sensor='12' AND timestamp= '02.08.2011') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    OR (ID_sensor='11' AND timestamp= '02.08.2011'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This can, of course, then be refactored into&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Temperatures2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT temperatures &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE not (   (ID_sensor='11' or ID_sensor='12') AND timestamp=&lt;/P&gt;&lt;P&gt;'02.08.2011'   );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're considering listing lots of sensors to be excluded, consider&lt;/P&gt;&lt;P&gt;replacing " ID_sensor='11' or ID_sensor='12' " with "&lt;/P&gt;&lt;P&gt;match(ID_sensor,'11','12')&amp;lt;&amp;gt;0 "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally, if you're going to want to change the list of sensors on&lt;/P&gt;&lt;P&gt;any regular basis, then avoid changing your code each time by listing&lt;/P&gt;&lt;P&gt;them in a CSV or XLS file, loading them in, and then using a JOIN or&lt;/P&gt;&lt;P&gt;KEEP to filter.  But I imagine you'll need further assistance from this&lt;/P&gt;&lt;P&gt;forum if you decide to go down that path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Angus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Sep 2011 22:43:37 GMT</pubDate>
    <dc:creator>gussfish</dc:creator>
    <dc:date>2011-09-27T22:43:37Z</dc:date>
    <item>
      <title>using WHERE in LOAD more than once</title>
      <link>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293105#M1184740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;im trying to delete some data from a table.&lt;/P&gt;&lt;P&gt;the example its about temperature and sensors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the data of sensors 11 and 12 has to be deleted on a certain date(s), WHILE is used to delete them on LOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i didnt find anything in the reference or in the community about using 2 or more WHERE cases while loading data.&lt;/P&gt;&lt;P&gt;so, if i want do delete ID_sensor 12 and 11, this is not possible at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temperatures2:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT temperatures &lt;/P&gt;&lt;P&gt;WHERE ID_sensor&amp;lt;&amp;gt;'12' OR timestamp&amp;lt;&amp;gt; '02.08.2011',&lt;/P&gt;&lt;P&gt;WHERE ID_sensor&amp;lt;&amp;gt;'11' OR timestamp&amp;lt;&amp;gt; '02.08.2011';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temperatures2:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT temperatures &lt;/P&gt;&lt;P&gt;WHERE ID_sensor&amp;lt;&amp;gt;'12' OR timestamp&amp;lt;&amp;gt; '02.08.2011' AND&lt;/P&gt;&lt;P&gt;/*WHERE*/ ID_sensor&amp;lt;&amp;gt;'11' OR timestamp&amp;lt;&amp;gt; '02.08.2011';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the only solution i found, was:&lt;/P&gt;&lt;P&gt;1. Load QVD with "WHERE11" case (Table 1, new name)&lt;/P&gt;&lt;P&gt;2. ResidentLoad with "WHERE 12" case (Table 2, former name of table 1)&lt;/P&gt;&lt;P&gt;3. droptable (Table 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible, to use WHERE more than once per table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks, alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 11:09:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293105#M1184740</guid>
      <dc:creator />
      <dc:date>2011-09-27T11:09:33Z</dc:date>
    </item>
    <item>
      <title>using WHERE in LOAD more than once</title>
      <link>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293106#M1184741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; no its not &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can have one where statement per table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 11:25:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293106#M1184741</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-09-27T11:25:06Z</dc:date>
    </item>
    <item>
      <title>using WHERE in LOAD more than once</title>
      <link>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293107#M1184742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this work? Using parenthesis should tell it how to group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temperatures2:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT temperatures &lt;/P&gt;&lt;P&gt;WHERE( ID_sensor&amp;lt;&amp;gt;'12' and timestamp&amp;lt;&amp;gt; '02.08.2011') AND&lt;/P&gt;&lt;P&gt;( ID_sensor&amp;lt;&amp;gt;'11' and timestamp&amp;lt;&amp;gt; '02.08.2011');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 12:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293107#M1184742</guid>
      <dc:creator />
      <dc:date>2011-09-27T12:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: using WHERE in LOAD more than once</title>
      <link>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293108#M1184743</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;How about Where Timestamp &amp;lt;&amp;gt; '02.08.2011' and not match (ID_Sensor,11,12).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 12:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293108#M1184743</guid>
      <dc:creator>john_duffy</dc:creator>
      <dc:date>2011-09-27T12:20:05Z</dc:date>
    </item>
    <item>
      <title>using WHERE in LOAD more than once</title>
      <link>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293109#M1184744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; it does work !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i thought, its not possible to use more expressions in one load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT temperatures &lt;/P&gt;&lt;P&gt;WHERE( ID_sensor&amp;lt;&amp;gt;'12' OR timestamp&amp;lt;&amp;gt; '02.08.2011') AND&lt;/P&gt;&lt;P&gt;( ID_sensor&amp;lt;&amp;gt;'11' OR timestamp&amp;lt;&amp;gt; '02.08.2011');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It deletes all data from sensors 11 and 12 on date 02.08.2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;this saved a lot of code&lt;/P&gt;&lt;P&gt;the resident load stunt used 70+ lines of code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 13:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293109#M1184744</guid>
      <dc:creator />
      <dc:date>2011-09-27T13:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: using WHERE in LOAD more than once</title>
      <link>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293110#M1184745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;the trick here is to invert your conditions, just so:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Temperatures2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT temperatures &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE not &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ((ID_sensor='12' AND timestamp= '02.08.2011') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    OR (ID_sensor='11' AND timestamp= '02.08.2011'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This can, of course, then be refactored into&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Temperatures2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT temperatures &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE not (   (ID_sensor='11' or ID_sensor='12') AND timestamp=&lt;/P&gt;&lt;P&gt;'02.08.2011'   );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're considering listing lots of sensors to be excluded, consider&lt;/P&gt;&lt;P&gt;replacing " ID_sensor='11' or ID_sensor='12' " with "&lt;/P&gt;&lt;P&gt;match(ID_sensor,'11','12')&amp;lt;&amp;gt;0 "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally, if you're going to want to change the list of sensors on&lt;/P&gt;&lt;P&gt;any regular basis, then avoid changing your code each time by listing&lt;/P&gt;&lt;P&gt;them in a CSV or XLS file, loading them in, and then using a JOIN or&lt;/P&gt;&lt;P&gt;KEEP to filter.  But I imagine you'll need further assistance from this&lt;/P&gt;&lt;P&gt;forum if you decide to go down that path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Angus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 22:43:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/using-WHERE-in-LOAD-more-than-once/m-p/293110#M1184745</guid>
      <dc:creator>gussfish</dc:creator>
      <dc:date>2011-09-27T22:43:37Z</dc:date>
    </item>
  </channel>
</rss>

