<?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: command &amp;quot;where&amp;quot; not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572706#M199610</link>
    <description>&lt;P&gt;I think that this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where NOT (id_old = id OR user = username)&lt;/LI-CODE&gt;&lt;P&gt;should be&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where (id_old != id AND user != username)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Oct 2021 17:03:55 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2021-10-27T17:03:55Z</dc:date>
    <item>
      <title>command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572664#M199595</link>
      <description>&lt;P&gt;the "where" command checks only one condition&amp;nbsp;&lt;/P&gt;&lt;P&gt;doesn't work like that&lt;/P&gt;&lt;P&gt;my search:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;. . . .&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| where NOT (id_old = id OR user = username)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but there is a separate input, then everything works correctly.&lt;/P&gt;&lt;P&gt;help plz&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 14:48:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572664#M199595</guid>
      <dc:creator>gitingua</dc:creator>
      <dc:date>2021-10-27T14:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572672#M199597</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232899"&gt;@gitingua&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;I don't think so like this way where command gonna work. If you wanted to remove this &lt;STRONG&gt;(id_old = id OR user = username) &lt;/STRONG&gt;field value pair then simply filter in your search.&lt;/P&gt;&lt;P&gt;eg:- index=test NOT &lt;STRONG&gt;(id_old = id OR user = username) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------------------------&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this reply helps you, an upvote would be appreciated.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Namaste &lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 15:05:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572672#M199597</guid>
      <dc:creator>vikramyadav</dc:creator>
      <dc:date>2021-10-27T15:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572674#M199598</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;you could use OR AND etc. with where as you can see on&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/SearchReference/Where" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/SearchReference/Where&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Could it be that there is confusion with field name and constant? Search and where works different way with those. Please see docs and maybe this helps&amp;nbsp;&lt;A href="https://community.splunk.com/t5/All-Apps-and-Add-ons/Difference-between-WHERE-and-SEARCH-commands/m-p/199047" target="_blank"&gt;https://community.splunk.com/t5/All-Apps-and-Add-ons/Difference-between-WHERE-and-SEARCH-commands/m-p/199047&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There should be quite good explanation how those are differing, but I cannot find it now with google.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 15:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572674#M199598</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-10-27T15:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572675#M199599</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/109761"&gt;@vikramyadav&lt;/a&gt;&amp;nbsp;These parameters are used as a check.&amp;nbsp;&lt;/P&gt;&lt;P&gt;file.csv&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;user&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;id_old&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;info2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;john&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;abcd&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;qwer&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;index = IndexName&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;username&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;id&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;info2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;Aram&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;ghjk&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;qweiq&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Condition, if the user is not found in the file, then write it to the file&amp;nbsp;&lt;/P&gt;&lt;P&gt;the check is that if the id in index is not equal to id_old in file.csv, then it is added to the file with different values. or an event arrived in the index with a new user and after checking it is not in file.csv, then it is added to the file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;index="IndexName"&lt;BR /&gt;| table username, id, info2&lt;BR /&gt;| lookup file.csv user as username output id_old user&lt;BR /&gt;| where NOT (id_old = id or username = user) &amp;lt;-&amp;nbsp;This line checks only one condition. if I put only one condition, it works correctly. And I need if one condition is true then check the following&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/109761"&gt;@vikramyadav&lt;/a&gt;&amp;nbsp;Help pls&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 15:22:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572675#M199599</guid>
      <dc:creator>gitingua</dc:creator>
      <dc:date>2021-10-27T15:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572682#M199602</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/109761"&gt;@vikramyadav&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| where id_old != id or username != user&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;that doesn't work either&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 15:37:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572682#M199602</guid>
      <dc:creator>gitingua</dc:creator>
      <dc:date>2021-10-27T15:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572686#M199604</link>
      <description>You should use OR not or.</description>
      <pubDate>Wed, 27 Oct 2021 15:41:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572686#M199604</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-10-27T15:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572692#M199605</link>
      <description>&lt;P&gt;tried it, no result&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 16:00:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572692#M199605</guid>
      <dc:creator>gitingua</dc:creator>
      <dc:date>2021-10-27T16:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572696#M199606</link>
      <description>And those fields have values, not contains NULL? If needed add like (isnotnull(field1) AND isnotnull(field2)) AND field1 != field2</description>
      <pubDate>Wed, 27 Oct 2021 16:07:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572696#M199606</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-10-27T16:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572703#M199608</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/232899"&gt;@gitingua&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;index="IndexName"&lt;BR /&gt;| table username, id, info2&lt;BR /&gt;| lookup file.csv user as username output id_old user&lt;BR /&gt;| eval newuser = (id_old ,username)&lt;BR /&gt;| where NOT newuser&lt;/P&gt;&lt;P&gt;Also, can you let me know exactly what output you are looking for?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------------------------------------&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this reply helps you, an upvote would be appreciated.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Namaste &lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 16:44:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572703#M199608</guid>
      <dc:creator>vikramyadav</dc:creator>
      <dc:date>2021-10-27T16:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: command "where" not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572706#M199610</link>
      <description>&lt;P&gt;I think that this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where NOT (id_old = id OR user = username)&lt;/LI-CODE&gt;&lt;P&gt;should be&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where (id_old != id AND user != username)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 17:03:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/command-quot-where-quot-not-working/m-p/572706#M199610</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-10-27T17:03:55Z</dc:date>
    </item>
  </channel>
</rss>

