<?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: help on where not condition which works randomly in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/530981#M149995</link>
    <description>&lt;P&gt;Is anybody can't help?&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2020 10:04:04 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2020-11-26T10:04:04Z</dc:date>
    <item>
      <title>help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/527855#M149017</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;As you can see at the end of my search, I use a where condition&lt;/P&gt;&lt;P&gt;But sometimes, even if the condition is true ('Geolocation building' = 'SNOW building'), the events is displayed&lt;/P&gt;&lt;P&gt;what is wrong please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; `wire` 
| fields AP_NAME USERNAME LAST_SEEN 
| eval USERNAME=upper(USERNAME) 
| eval LAST_SEEN=strptime(LAST_SEEN, "%Y-%m-%d %H:%M:%S.%1N") 
| lookup ap.csv NAME as AP_NAME OUTPUT Building Country Site 
| lookup fo_all HOSTNAME as USERNAME output SITE ROOM COUNTRY BUILDING_CODE 
| eval Building=upper(Building) 
| eval Site=upper(Site) 
| eval SITE=upper(SITE) 
| eval Building=upper(Building) 
| eval LAST_SEEN = strftime(LAST_SEEN, "%Y-%m-%d %H:%M") 
| stats last(LAST_SEEN) as "Last check date", last(AP_NAME) as "Access point", last(Site) as "Geolocation site", last(Building) as "Geolocation building", last(SITE) as "SNOW site", last(BUILDING_CODE) as "S building" by USERNAME 
| where NOT ('Geolocation building' = 'S building')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested with :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search NOT ("Geolocation building" = "S building") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but same thing&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 11:04:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/527855#M149017</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-04T11:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/527933#M149033</link>
      <description>&lt;P&gt;In Splunk, double and single quotation marks are not always interchangeable.&amp;nbsp; This is especially true in the where command.&amp;nbsp; Double quotes surround literal strings and single quotes surround field names.&amp;nbsp; This means "&lt;FONT face="courier new,courier"&gt;where not ("Geolocation building" = "S building")&lt;/FONT&gt;" will always fail because the two strings are not the same.&lt;/P&gt;&lt;P&gt;Have you tried using either of the comparison functions: &lt;FONT face="courier new,courier"&gt;like&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;match&lt;/FONT&gt;?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where NOT like('Geolocation building','S building')&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Nov 2020 14:24:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/527933#M149033</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-11-04T14:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528065#M149079</link>
      <description>&lt;P&gt;Hi Rich&lt;/P&gt;&lt;P&gt;You are right for double quotes, it's just a copy past issue&lt;/P&gt;&lt;P&gt;Unfortunately I tried with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where NOT match ('Geolocation building','S building') &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where NOT like ('Geolocation building','S building') &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also note that when an event with 'Geolocation building' field = 'S building' field is displayed in spite of this where condition, the "Geolocation site' field is always different than the 'SNOW site' field&lt;/P&gt;&lt;P&gt;Is it possible that the issue comes from this?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2020 06:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528065#M149079</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-05T06:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528157#M149119</link>
      <description>I propose that use fields without spaces on your event processing phase and when everything is ready for presenting data to users then rename those. That will save you from lot of additional headaches;-)</description>
      <pubDate>Thu, 05 Nov 2020 15:29:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528157#M149119</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-11-05T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528393#M149195</link>
      <description>&lt;P class="lia-indent-padding-left-30px"&gt;you mean something like this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where NOT like ('Geolocation','S')
| rename "Geolocation" as toto, "S" as tutu?&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 05:01:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528393#M149195</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-07T05:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528403#M149198</link>
      <description>I mean that in stats you should do “stats last(building) as geo_building” ... then when geo_building.... and in last phase rename geo_building as “Geolocation building”</description>
      <pubDate>Sat, 07 Nov 2020 17:49:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528403#M149198</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-11-07T17:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528416#M149204</link>
      <description>&lt;P&gt;here is what I done&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats last(LAST_SEEN) as "Last check date", last(AP_NAME) as "Access point", last(Site) as "Geolocation site", last(Building) as "Geobuild", last(SITE) as "SNOW site", last(BUILDING_CODE) as "SNOWbuild" by USERNAME 
| rename Geobuild as "Geolocation building", SNOWbuild as "SNOW building"
| where NOT like ('Geolocation building','SNOW building') &lt;/LI-CODE&gt;&lt;P&gt;and unfortunately, it doesn't works....&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 05:14:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528416#M149204</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-08T05:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528418#M149206</link>
      <description>&lt;P&gt;I give you the entire search, pearhaps there is something wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; `wire` 
| fields AP_NAME USERNAME LAST_SEEN 
| eval USERNAME=upper(USERNAME) 
| eval LAST_SEEN=strptime(LAST_SEEN, "%Y-%m-%d %H:%M:%S.%1N") 
| lookup ap.csv NAME as AP_NAME OUTPUT Building Country Site 
| lookup fo_all HOSTNAME as USERNAME output SITE ROOM COUNTRY BUILDING_CODE 
| eval Building=upper(Building) 
| eval Site=upper(Site) 
| eval SITE=upper(SITE) 
| eval Building=upper(Building) 
| eval LAST_SEEN = strftime(LAST_SEEN, "%Y-%m-%d %H:%M") 
| stats last(LAST_SEEN) as "Last check date", last(AP_NAME) as "Access point", last(Site) as "Geolocation site", last(Building) as "Geobuild", last(SITE) as "SNOW site", last(BUILDING_CODE) as "SNOWbuild" by USERNAME 
| rename Geobuild as "Geolocation building", SNOWbuild as "SNOW building"
| where NOT like ('Geolocation building','SNOW building') 
| rename USERNAME as Hostname 
| sort -"Last check date"&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 08 Nov 2020 05:29:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/528418#M149206</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-08T05:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/529560#M149573</link>
      <description>&lt;P&gt;Is anybody can't help please??&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 15:28:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/529560#M149573</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-16T15:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/530054#M149756</link>
      <description>&lt;P&gt;Another remark&lt;/P&gt;&lt;P&gt;When I am doing a value coloring on the 2 fields with a rule color, it's impossible to have the same color for the 2 fields even if Geolocation building = SNOW building&lt;/P&gt;&lt;P&gt;So it shows that there is something wick make that one of the values&amp;nbsp; is not interpreted like it should&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 09:37:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/530054#M149756</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-19T09:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/530981#M149995</link>
      <description>&lt;P&gt;Is anybody can't help?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 10:04:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/530981#M149995</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-26T10:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/530983#M149997</link>
      <description>&lt;LI-CODE lang="markup"&gt;`wire` 
| fields AP_NAME USERNAME LAST_SEEN 
| eval USERNAME=upper(USERNAME) 
| eval LAST_SEEN=strptime(LAST_SEEN, "%Y-%m-%d %H:%M:%S.%1N") 
| lookup ap.csv NAME as AP_NAME OUTPUT Building Country Site 
| lookup fo_all HOSTNAME as USERNAME output SITE ROOM COUNTRY BUILDING_CODE 
| eval Building=upper(Building) 
| eval Site=upper(Site) 
| eval SITE=upper(SITE) 
| eval Building=upper(Building) 
| eval LAST_SEEN = strftime(LAST_SEEN, "%Y-%m-%d %H:%M") 
| stats last(LAST_SEEN) as Last_check_date, last(AP_NAME) as Access_point, last(Site) as Geolocation_site, last(Building) as Geobuild, last(SITE) as SNOW_site, last(BUILDING_CODE) as SNOWbuild by USERNAME 
| where NOT like (Geolocation, SNOWbuild) 
| rename USERNAME as Hostname 
| sort -Last_check_date
| rename &amp;lt;what ever field you want&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this works?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 10:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/530983#M149997</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-11-26T10:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/531001#M150003</link>
      <description>&lt;P&gt;no same problem....&lt;/P&gt;&lt;P&gt;as you can see in the attachement, the results display hostname with Geobuild ) SNOWbuild....&lt;/P&gt;&lt;P&gt;&lt;A title="FILE" href="https://www.cjoint.com/c/JKAmqiSYOQg" target="_self"&gt;https://www.cjoint.com/c/JKAmqiSYOQg&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 12:17:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/531001#M150003</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-11-26T12:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/531510#M150125</link>
      <description>&lt;P&gt;Is anybody can't help?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 12:39:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/531510#M150125</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-12-01T12:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/531631#M150151</link>
      <description>&lt;P&gt;Considering that the datas come from 2 différent CSV files, is it possible that the issue comes from the data format?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 05:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/531631#M150151</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2020-12-02T05:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/537350#M151905</link>
      <description>&lt;P&gt;Is anybody can't help please?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 05:47:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/537350#M151905</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2021-01-27T05:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: help on where not condition which works randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/537351#M151906</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Maybe there are whitespaces in your csv data, please try below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; `wire` 
| fields AP_NAME USERNAME LAST_SEEN 
| eval USERNAME=upper(USERNAME) 
| eval LAST_SEEN=strptime(LAST_SEEN, "%Y-%m-%d %H:%M:%S.%1N") 
| lookup ap.csv NAME as AP_NAME OUTPUT Building Country Site 
| lookup fo_all HOSTNAME as USERNAME output SITE ROOM COUNTRY BUILDING_CODE 
| eval Site=upper(Site) 
| eval SITE=upper(SITE) 
| eval Building=upper(trim(Building))
| eval BUILDING_CODE =upper(trim(BUILDING_CODE))
| eval LAST_SEEN = strftime(LAST_SEEN, "%Y-%m-%d %H:%M") 
| stats last(LAST_SEEN) as "Last check date", last(AP_NAME) as "Access point", last(Site) as "Geolocation site", last(Building) as "Geolocation building", last(SITE) as "SNOW site", last(BUILDING_CODE) as "S building" by USERNAME 
| where 'Geolocation building' != 'S building'&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 27 Jan 2021 06:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-where-not-condition-which-works-randomly/m-p/537351#M151906</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-01-27T06:11:29Z</dc:date>
    </item>
  </channel>
</rss>

