<?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: Syntax for subsearches for using NOT function btw 2 savedsearches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97529#M25169</link>
    <description>&lt;P&gt;I get around the limitation of &lt;CODE&gt;|search NOT [subsearch]&lt;/CODE&gt; by putting the NOT  in the subsearch.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;|savedsearch "saved1" [|savedsearch "saved2" | dedup accid| fields accid|format "NOT (" "(" "" ")" "OR" ")" ]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This forces the query returned to use the NOT.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2013 12:36:19 GMT</pubDate>
    <dc:creator>alacercogitatus</dc:creator>
    <dc:date>2013-04-17T12:36:19Z</dc:date>
    <item>
      <title>Syntax for subsearches for using NOT function btw 2 savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97526#M25166</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;

&lt;P&gt;I have here 2 savedsearches, now i want to do a left outer join between both of them.&lt;BR /&gt;
I'm using the following query:&lt;BR /&gt;
&lt;STRONG&gt;| savedsearch "saved1" NOT [| savedsearch "saved2" | dedup accid | fields accid]&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;There seems to be a problem with the syntax.&lt;BR /&gt;
Or is it not possible to use it with SavedSearch??&lt;/P&gt;

&lt;P&gt;Please Help.&lt;BR /&gt;
Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 10:08:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97526#M25166</guid>
      <dc:creator>pradeep0802</dc:creator>
      <dc:date>2013-04-17T10:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for subsearches for using NOT function btw 2 savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97527#M25167</link>
      <description>&lt;P&gt;The subsearch's results will be expanded to something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((accid="accid1") OR (accid="accid2") OR ... )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which is incorrect syntax for the subsearch command. You probably want to use it with the search command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| savedsearch "saved1" | search NOT [| savedsearch "saved2" | dedup accid | fields accid]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Apr 2013 10:51:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97527#M25167</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-17T10:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for subsearches for using NOT function btw 2 savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97528#M25168</link>
      <description>&lt;P&gt;if i use &lt;BR /&gt;
| search NOT&lt;BR /&gt;
the resulted output is wrong&lt;/P&gt;

&lt;P&gt;o\p saved1 is 20 rows and saved2 is 14 rows, there are 12 rows common in both. what we need is 8 rows from saved1 that are not present in saved2.. But using | search NOT gives result similar to outer join. ie 20 rows of saved1&lt;/P&gt;

&lt;P&gt;what we are trying to achieve is similar to NOT IN clause in sql.&lt;/P&gt;

&lt;P&gt;Any suggestion where we be going wrong..&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 11:17:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97528#M25168</guid>
      <dc:creator>pradeep0802</dc:creator>
      <dc:date>2013-04-17T11:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for subsearches for using NOT function btw 2 savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97529#M25169</link>
      <description>&lt;P&gt;I get around the limitation of &lt;CODE&gt;|search NOT [subsearch]&lt;/CODE&gt; by putting the NOT  in the subsearch.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;|savedsearch "saved1" [|savedsearch "saved2" | dedup accid| fields accid|format "NOT (" "(" "" ")" "OR" ")" ]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This forces the query returned to use the NOT.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 12:36:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97529#M25169</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-04-17T12:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax for subsearches for using NOT function btw 2 savedsearches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97530#M25170</link>
      <description>&lt;P&gt;|savedsearch "saved1" [|savedsearch "saved2" | dedup accid| fields accid|format "NOT (" "(" "" ")" "OR" ")" ]&lt;/P&gt;

&lt;P&gt;doesn't return anything&lt;BR /&gt;
But,&lt;BR /&gt;
|savedsearch "saved1" | search NOT [|savedsearch "saved2" | dedup accid| fields accid|format "NOT (" "(" "" ")" "OR" ")" ]&lt;/P&gt;

&lt;P&gt;gives matching rows from both savedsearches.&lt;/P&gt;

&lt;P&gt;but we need other unmatched rows from saved1.&lt;/P&gt;

&lt;P&gt;any suggestion..? or any other way we can achieve this.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 04:56:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Syntax-for-subsearches-for-using-NOT-function-btw-2/m-p/97530#M25170</guid>
      <dc:creator>pradeep0802</dc:creator>
      <dc:date>2013-04-18T04:56:21Z</dc:date>
    </item>
  </channel>
</rss>

