<?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 How to search all field values except a particular one? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-all-field-values-except-a-particular-one/m-p/326203#M161758</link>
    <description>&lt;P&gt;I have an app that can show source by country &lt;/P&gt;

&lt;P&gt;Example:&lt;BR /&gt;
Country=China&lt;/P&gt;

&lt;P&gt;In SPL how would I format this if I wanted to Search like all possible values for Country except like USA?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Apr 2018 18:45:11 GMT</pubDate>
    <dc:creator>summitsplunk</dc:creator>
    <dc:date>2018-04-10T18:45:11Z</dc:date>
    <item>
      <title>How to search all field values except a particular one?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-all-field-values-except-a-particular-one/m-p/326203#M161758</link>
      <description>&lt;P&gt;I have an app that can show source by country &lt;/P&gt;

&lt;P&gt;Example:&lt;BR /&gt;
Country=China&lt;/P&gt;

&lt;P&gt;In SPL how would I format this if I wanted to Search like all possible values for Country except like USA?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 18:45:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-all-field-values-except-a-particular-one/m-p/326203#M161758</guid>
      <dc:creator>summitsplunk</dc:creator>
      <dc:date>2018-04-10T18:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to search all field values except a particular one?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-all-field-values-except-a-particular-one/m-p/326204#M161759</link>
      <description>&lt;P&gt;try &lt;CODE&gt;Country!=*USA*&lt;/CODE&gt; if there is a wildcard, not that I can imagine a wildcard in the country.&lt;BR /&gt;
otherwise, &lt;CODE&gt;Country!="USA"&lt;/CODE&gt; or &lt;CODE&gt;NOT Country="USA"&lt;/CODE&gt; should do the trick&lt;/P&gt;

&lt;P&gt;it should be noted that when using &lt;CODE&gt;!=&lt;/CODE&gt;, any event that does not include Country will also be excluded whereas when using &lt;CODE&gt;NOT&lt;/CODE&gt;, events where Country doesn't exist will come back as well. So if Country is in 80% of your events and you only want to &lt;EM&gt;exclude&lt;/EM&gt; "USA" but want to &lt;EM&gt;include&lt;/EM&gt; events without Country, use &lt;CODE&gt;NOT Country="USA"&lt;/CODE&gt;. If you want to &lt;EM&gt;exclude both&lt;/EM&gt; null country values as well as USA, use &lt;CODE&gt;Country!="USA"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 18:47:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-all-field-values-except-a-particular-one/m-p/326204#M161759</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-04-10T18:47:41Z</dc:date>
    </item>
  </channel>
</rss>

