<?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: Splunk search for NOT IN in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32641#M5822</link>
    <description>&lt;P&gt;Be aware that if your subsearch starts with a generating command, you must exclude the search keyword:&lt;/P&gt;

&lt;P&gt;e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=A NOT [ inputlookup my_lookup | rename SN as Serial | fields Serial ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Apr 2015 14:33:37 GMT</pubDate>
    <dc:creator>joxley</dc:creator>
    <dc:date>2015-04-14T14:33:37Z</dc:date>
    <item>
      <title>Splunk search for NOT IN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32638#M5819</link>
      <description>&lt;P&gt;I have two sourcetypes A and B with column names Serial and SN respectively&lt;/P&gt;

&lt;P&gt;To find where there is like a column name match in both A and B -&amp;gt; &lt;BR /&gt;
(sourcetype=A Serial=&lt;EM&gt;) OR (sourcetype=B SN=&lt;/EM&gt;) | search where Serial=SN&lt;/P&gt;

&lt;P&gt;How do I write a query such that -&amp;gt; For every Serial (in A) - there are no matches to SN&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2012 21:36:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32638#M5819</guid>
      <dc:creator>asarolkar</dc:creator>
      <dc:date>2012-04-20T21:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search for NOT IN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32639#M5820</link>
      <description>&lt;P&gt;One way to do it is to use a join on Serial and SN and then count the unique sourcetypes and look for results with 1 sourcetype of the kind you want. This may not be the most efficient way, but here goes:&lt;/P&gt;

&lt;P&gt;sourcetype=A Serial=*|rename Serial as SN|join SN [search sourcetype=B SN=*]|stats first(_time) by SN,sourcetype|stats dc(sourcetype) as numst,min(sourcetype) as minst by SN|where numst==1 AND minst==A&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2012 22:00:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32639#M5820</guid>
      <dc:creator>reed_kelly</dc:creator>
      <dc:date>2012-04-20T22:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search for NOT IN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32640#M5821</link>
      <description>&lt;P&gt;You can achieve this with a NOT on a subsearch , equivalent to SQL "NOT IN".&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.2.2/User/HowSubsearchesWork"&gt;Follow this link&lt;/A&gt; and scroll down to the "Use subsearch to correlate data" section:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=A NOT [search sourcetype=B | rename SN as Serial | fields Serial ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Apr 2012 00:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32640#M5821</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-04-21T00:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search for NOT IN</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32641#M5822</link>
      <description>&lt;P&gt;Be aware that if your subsearch starts with a generating command, you must exclude the search keyword:&lt;/P&gt;

&lt;P&gt;e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=A NOT [ inputlookup my_lookup | rename SN as Serial | fields Serial ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Apr 2015 14:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-search-for-NOT-IN/m-p/32641#M5822</guid>
      <dc:creator>joxley</dc:creator>
      <dc:date>2015-04-14T14:33:37Z</dc:date>
    </item>
  </channel>
</rss>

