<?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 Why isn't my where clause working in this similar search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-where-clause-working-in-this-similar-search/m-p/358300#M105927</link>
    <description>&lt;P&gt;I want to run a search but can't figure out what's the difference when I make changes to it using the 'where' clause&lt;/P&gt;

&lt;P&gt;What's the difference between&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...base search extension!=NULL|where Module="previewservice" | chart count by  Module, FinalState
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  ...base search |where Module="previewservice" AND extension!=NULL| chart count by  Module, FinalState
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The first one produces an output while the second one does not &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2017 12:33:43 GMT</pubDate>
    <dc:creator>pranaynanda</dc:creator>
    <dc:date>2017-09-26T12:33:43Z</dc:date>
    <item>
      <title>Why isn't my where clause working in this similar search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-where-clause-working-in-this-similar-search/m-p/358300#M105927</link>
      <description>&lt;P&gt;I want to run a search but can't figure out what's the difference when I make changes to it using the 'where' clause&lt;/P&gt;

&lt;P&gt;What's the difference between&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...base search extension!=NULL|where Module="previewservice" | chart count by  Module, FinalState
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  ...base search |where Module="previewservice" AND extension!=NULL| chart count by  Module, FinalState
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The first one produces an output while the second one does not &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 12:33:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-where-clause-working-in-this-similar-search/m-p/358300#M105927</guid>
      <dc:creator>pranaynanda</dc:creator>
      <dc:date>2017-09-26T12:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my where clause working in this similar search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-where-clause-working-in-this-similar-search/m-p/358301#M105928</link>
      <description>&lt;P&gt;Your first search string is the more efficient of the two, as it's best to exclude as early as possible. However, to make the second example work, replace&lt;BR /&gt;
&lt;CODE&gt;And extension!=NULL&lt;/CODE&gt;&lt;BR /&gt;
with&lt;BR /&gt;
&lt;CODE&gt;isnotnull(extension)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This is because &lt;CODE&gt;where&lt;/CODE&gt; uses &lt;CODE&gt;eval&lt;/CODE&gt; expressions, one of which is the function &lt;CODE&gt;isnotnull&lt;/CODE&gt;. In your second example &lt;CODE&gt;extension!=NULL&lt;/CODE&gt; is actually interpreted as &lt;CODE&gt;&amp;lt;fieldA&amp;gt; is not equal to &amp;lt;fieldB&amp;gt;&lt;/CODE&gt; (where &lt;CODE&gt;&amp;lt;fieldB&amp;gt;&lt;/CODE&gt; is a non-existent field called NULL).&lt;BR /&gt;
For reference, see the documentation on Informational Functions (&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/InformationalFunctions"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/InformationalFunctions&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 12:48:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-where-clause-working-in-this-similar-search/m-p/358301#M105928</guid>
      <dc:creator>RPiccone</dc:creator>
      <dc:date>2017-09-26T12:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why isn't my where clause working in this similar search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-where-clause-working-in-this-similar-search/m-p/358302#M105929</link>
      <description>&lt;P&gt;Salut! You Sir are a true genius!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 13:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-isn-t-my-where-clause-working-in-this-similar-search/m-p/358302#M105929</guid>
      <dc:creator>pranaynanda</dc:creator>
      <dc:date>2017-09-26T13:06:31Z</dc:date>
    </item>
  </channel>
</rss>

