<?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 Splunk where not query returning incorrect results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485320#M193558</link>
    <description>&lt;P&gt;Hello, I have the following where not query returning rows that exists in sub search, following is the query&lt;BR /&gt;
environment=test earliest=-48h  latest=-24h index=iis_openapi /internal/loyalty/v1/ cs_uri_stem="&lt;EM&gt;registrations&lt;/EM&gt;"   cardid="*" &lt;BR /&gt;
WHERE NOT [ search earliest=-48h index=log-cdx-prod source=kubernetes sourcetype=_json "cardRegistered" "cardId" | rename cardNumber as cardid  | fields cardid | format] | table cardid&lt;/P&gt;

&lt;P&gt;query says take cardid list from first query and return where cardid is not found in second sub search query, I am getting results where cardid is present in second query which is incorrect,  condition is where not, any ideas what is going on here ?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 04:27:31 GMT</pubDate>
    <dc:creator>msrama5</dc:creator>
    <dc:date>2020-09-30T04:27:31Z</dc:date>
    <item>
      <title>Splunk where not query returning incorrect results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485320#M193558</link>
      <description>&lt;P&gt;Hello, I have the following where not query returning rows that exists in sub search, following is the query&lt;BR /&gt;
environment=test earliest=-48h  latest=-24h index=iis_openapi /internal/loyalty/v1/ cs_uri_stem="&lt;EM&gt;registrations&lt;/EM&gt;"   cardid="*" &lt;BR /&gt;
WHERE NOT [ search earliest=-48h index=log-cdx-prod source=kubernetes sourcetype=_json "cardRegistered" "cardId" | rename cardNumber as cardid  | fields cardid | format] | table cardid&lt;/P&gt;

&lt;P&gt;query says take cardid list from first query and return where cardid is not found in second sub search query, I am getting results where cardid is present in second query which is incorrect,  condition is where not, any ideas what is going on here ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:27:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485320#M193558</guid>
      <dc:creator>msrama5</dc:creator>
      <dc:date>2020-09-30T04:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk where not query returning incorrect results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485321#M193559</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Remove&lt;/STRONG&gt; &lt;STRONG&gt;WHERE&lt;/STRONG&gt; from query and put sub-search in parentheses after &lt;STRONG&gt;NOT&lt;/STRONG&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;environment=test earliest=-48h latest=-24h index=iis_openapi /internal/loyalty/v1/ cs_uri_stem="registrations" cardid="*" NOT ([ search earliest=-48h index=log-cdx-prod source=kubernetes sourcetype=_json "cardRegistered" "cardId" | rename cardNumber as cardid | fields cardid | format]) | table cardid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Mar 2020 05:30:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485321#M193559</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-04T05:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk where not query returning incorrect results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485322#M193560</link>
      <description>&lt;P&gt;Adding bracket is returning the same results , what I need is card id present in first query should not return based on the second sub search query, why would this query fail and return cardid present in first query ?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 19:44:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485322#M193560</guid>
      <dc:creator>msrama5</dc:creator>
      <dc:date>2020-03-04T19:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk where not query returning incorrect results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485323#M193561</link>
      <description>&lt;P&gt;Remove cardid=“*” in first search and check.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2020 23:32:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-where-not-query-returning-incorrect-results/m-p/485323#M193561</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-04T23:32:54Z</dc:date>
    </item>
  </channel>
</rss>

