<?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: Compare 2 field values from different sources. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269546#M51747</link>
    <description>&lt;P&gt;if you're satisfied of the answer, please, accept the answer.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2016 11:20:51 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2016-09-09T11:20:51Z</dc:date>
    <item>
      <title>Compare 2 field values from different sources.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269542#M51743</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Scenario&lt;/STRONG&gt;&lt;BR /&gt;
We process emails looking for order numbers (ON). We need to be able to compare the order numbers we seen in the emails to our database. We're looking for matching and not matching order numbers.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;How the data looks.&lt;/STRONG&gt;&lt;BR /&gt;
ON_email: 123, 234, 345, 456&lt;BR /&gt;
ON_database: 123, 098, 456&lt;/P&gt;

&lt;P&gt;Order numbers that match (seen in both database and emails): &lt;STRONG&gt;123, 456&lt;/STRONG&gt;&lt;BR /&gt;
Order numbers only seen in database: &lt;STRONG&gt;098&lt;/STRONG&gt;&lt;BR /&gt;
Order numbers only seen in emails: &lt;STRONG&gt;234, 345&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index = a OR index = b | table ON_email ON_database&lt;/CODE&gt;&amp;lt;&amp;lt; This works and shows all the data.&lt;BR /&gt;
But when i try to compare i can't see any data.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269542#M51743</guid>
      <dc:creator>arrowecssupport</dc:creator>
      <dc:date>2020-09-29T10:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 field values from different sources.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269543#M51744</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = a OR index = b | eval ON=coalesce(ON_email, ON_database) | stats dc(index) values(index) BY ON
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or maybe this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = a OR index = b | eval ON=coalesce(ON_email, ON_database) | stats values(ON) BY index
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jul 2016 17:36:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269543#M51744</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-22T17:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 field values from different sources.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269544#M51745</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = a OR index = b | makemv ON_email delim="," | makemv delim=","  ON_database | eval ON=coalesce(ON_email, ON_database) | mvexpand ON | stats values(ON) by index
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jul 2016 17:58:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269544#M51745</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-22T17:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 field values from different sources.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269545#M51746</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval count=0 | append [ search  | stats count by order_number ] | stats sum(count) AS Total | where Total&amp;gt;0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in this way you can find the result of the first search that are also in the second one.&lt;BR /&gt;
Be careful: the field name must be the same in both the searches, id they aren't, rename one of them.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jul 2016 10:29:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269545#M51746</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-07-23T10:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 field values from different sources.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269546#M51747</link>
      <description>&lt;P&gt;if you're satisfied of the answer, please, accept the answer.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 11:20:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Compare-2-field-values-from-different-sources/m-p/269546#M51747</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-09-09T11:20:51Z</dc:date>
    </item>
  </channel>
</rss>

